Package com.yahoo.io
Class BufferChain
- java.lang.Object
-
- com.yahoo.io.BufferChain
-
public final class BufferChain extends Object
Data store for AbstractByteWriter. Tested in unit tests for ByteWriter.- Author:
- Steinar Knutsen
-
-
Constructor Summary
Constructors Constructor Description BufferChain(WritableByteTransmitter endpoint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
append(byte b)
void
append(byte[] alreadyEncoded)
void
append(byte[] alreadyEncoded, int offset, int length)
void
append(AbstractUtf8Array v)
void
append(ByteBuffer alreadyEncoded)
void
append(CharBuffer toEncode, CharsetEncoder encoder)
long
appended()
void
flush()
-
-
-
Constructor Detail
-
BufferChain
public BufferChain(WritableByteTransmitter endpoint)
-
-
Method Detail
-
append
public void append(byte b) throws IOException
- Throws:
IOException
-
append
public void append(AbstractUtf8Array v) throws IOException
- Throws:
IOException
-
append
public void append(byte[] alreadyEncoded) throws IOException
- Throws:
IOException
-
append
public void append(byte[] alreadyEncoded, int offset, int length) throws IOException
- Throws:
IOException
-
append
public void append(ByteBuffer alreadyEncoded) throws IOException
- Throws:
IOException
-
append
public void append(CharBuffer toEncode, CharsetEncoder encoder) throws IOException
- Throws:
IOException
-
flush
public void flush() throws IOException
- Throws:
IOException
-
appended
public long appended()
- Returns:
- number of bytes written to this buffer
-
-