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
,java.io.Closeable
,java.io.Flushable
,java.lang.Appendable
,java.lang.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()
java.nio.ByteBuffer
getBuf()
Return a buffer ready for read.void
send(java.nio.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(java.nio.ByteBuffer src) throws java.io.IOException
- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException
- Specified by:
flush
in interfacejava.io.Flushable
- Specified by:
flush
in classjava.io.Writer
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Specified by:
close
in classjava.io.Writer
- Throws:
java.io.IOException
-
getBuf
public java.nio.ByteBuffer getBuf()
Return a buffer ready for read. Must only be called after writer has been closed.- Returns:
- A flipped ByteBuffer
-
-