Package com.yahoo.io
Class Utf8ByteWriter
- java.lang.Object
-
- java.io.Writer
-
- com.yahoo.text.GenericWriter
-
- com.yahoo.io.AbstractByteWriter
-
- com.yahoo.io.Utf8ByteWriter
-
- All Implemented Interfaces:
WritableByteTransmitter
,Closeable
,Flushable
,Appendable
,AutoCloseable
public class Utf8ByteWriter extends AbstractByteWriter
-
-
Field Summary
-
Fields inherited from class com.yahoo.io.AbstractByteWriter
buffer, charBuffer, encoder
-
-
Constructor Summary
Constructors Constructor Description Utf8ByteWriter(int initialBuffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
ByteBuffer
getBuf()
Return a buffer ready for read.void
send(ByteBuffer src)
-
Methods inherited from class com.yahoo.io.AbstractByteWriter
append, append, append, append, appended, getEncoding, write, write, write, write, write, write, write, write
-
Methods inherited from class com.yahoo.text.GenericWriter
write, write, write
-
-
-
-
Method Detail
-
send
public void send(ByteBuffer src) throws IOException
- Throws:
IOException
-
flush
public void flush() throws IOException
- Specified by:
flush
in interfaceFlushable
- Specified by:
flush
in classWriter
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classWriter
- Throws:
IOException
-
getBuf
public ByteBuffer getBuf()
Return a buffer ready for read. Must only be called after writer has been closed.- Returns:
- A flipped ByteBuffer
-
-