Package com.yahoo.io
Class BufferChain
- java.lang.Object
-
- com.yahoo.io.BufferChain
-
public final class BufferChain extends java.lang.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(java.nio.ByteBuffer alreadyEncoded)
void
append(java.nio.CharBuffer toEncode, java.nio.charset.CharsetEncoder encoder)
long
appended()
void
flush()
-
-
-
Constructor Detail
-
BufferChain
public BufferChain(WritableByteTransmitter endpoint)
-
-
Method Detail
-
append
public void append(byte b) throws java.io.IOException
- Throws:
java.io.IOException
-
append
public void append(AbstractUtf8Array v) throws java.io.IOException
- Throws:
java.io.IOException
-
append
public void append(byte[] alreadyEncoded) throws java.io.IOException
- Throws:
java.io.IOException
-
append
public void append(byte[] alreadyEncoded, int offset, int length) throws java.io.IOException
- Throws:
java.io.IOException
-
append
public void append(java.nio.ByteBuffer alreadyEncoded) throws java.io.IOException
- Throws:
java.io.IOException
-
append
public void append(java.nio.CharBuffer toEncode, java.nio.charset.CharsetEncoder encoder) throws java.io.IOException
- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException
- Throws:
java.io.IOException
-
appended
public long appended()
- Returns:
- number of bytes written to this buffer
-
-