com.go.trove.io
Interface ByteBuffer

All Superinterfaces:
ByteData
All Known Subinterfaces:
ByteBuffer, CharToByteBuffer, CharToByteBuffer
All Known Implementing Classes:
DefaultByteBuffer, FileByteBuffer, SpilloverByteBuffer

public interface ByteBuffer
extends ByteData

ByteBuffer extends ByteData such that bytes can be added to it.

Version:
13 , 00/12/05
Author:
Brian S O'Neill

Method Summary
 void addCaptureBuffer(ByteBuffer buffer)
          Add a ByteBuffer that will receive a copy of all the data appended to this ByteBuffer.
 void append(byte b)
          Add one byte to the end of this buffer.
 void append(byte[] bytes)
          Copy the given bytes to the end of this buffer.
 void append(byte[] bytes, int offset, int length)
          Copy the given bytes to the end of this buffer, starting at the offset, using the length provided.
 void appendSurrogate(ByteData s)
          Append ByteData that will not be touched until this ByteBuffer needs to calculate its byte count, or it needs to write out.
 long getBaseByteCount()
          Returns the base byte count, which excludes surrogates.
 void removeCaptureBuffer(ByteBuffer buffer)
          Remove a capture buffer that was previously added by addCaptureBuffer.
 
Methods inherited from interface com.go.trove.io.ByteData
getByteCount, reset, writeTo
 

Method Detail

getBaseByteCount

public long getBaseByteCount()
                      throws java.io.IOException
Returns the base byte count, which excludes surrogates.

append

public void append(byte b)
            throws java.io.IOException
Add one byte to the end of this buffer.

append

public void append(byte[] bytes)
            throws java.io.IOException
Copy the given bytes to the end of this buffer.

append

public void append(byte[] bytes,
                   int offset,
                   int length)
            throws java.io.IOException
Copy the given bytes to the end of this buffer, starting at the offset, using the length provided.

appendSurrogate

public void appendSurrogate(ByteData s)
                     throws java.io.IOException
Append ByteData that will not be touched until this ByteBuffer needs to calculate its byte count, or it needs to write out. A null surrogate is not appended.

addCaptureBuffer

public void addCaptureBuffer(ByteBuffer buffer)
                      throws java.io.IOException
Add a ByteBuffer that will receive a copy of all the data appended to this ByteBuffer.

removeCaptureBuffer

public void removeCaptureBuffer(ByteBuffer buffer)
                         throws java.io.IOException
Remove a capture buffer that was previously added by addCaptureBuffer.