@InterfaceAudience.Private public class ByteBufferDataWriter extends DataOutputStream
| Constructor and Description |
|---|
ByteBufferDataWriter(NativeDataTarget handler) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
flush() |
boolean |
hasUnFlushedData()
Check whether there is unflushed data stored in the stream
|
boolean |
shortOfSpace(int dataLength)
Check whether this buffer has enough space to store length of bytes
|
void |
write(byte[] b,
int off,
int len) |
void |
write(int v) |
void |
writeBoolean(boolean v) |
void |
writeByte(int v) |
void |
writeBytes(String s) |
void |
writeChar(int v) |
void |
writeChars(String s) |
void |
writeDouble(double v) |
void |
writeFloat(float v) |
void |
writeInt(int v) |
void |
writeLong(long v) |
void |
writeShort(int v) |
void |
writeUTF(String str) |
writeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwritepublic ByteBufferDataWriter(NativeDataTarget handler)
public void write(int v)
throws IOException
write in interface DataOutputwrite in class OutputStreamIOExceptionpublic boolean shortOfSpace(int dataLength)
throws IOException
DataOutputStreamshortOfSpace in class DataOutputStreamdataLength - length of bytesIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in interface DataOutputwrite in class OutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class OutputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class OutputStreamIOExceptionpublic final void writeBoolean(boolean v)
throws IOException
IOExceptionpublic final void writeByte(int v)
throws IOException
IOExceptionpublic final void writeShort(int v)
throws IOException
IOExceptionpublic final void writeChar(int v)
throws IOException
IOExceptionpublic final void writeInt(int v)
throws IOException
IOExceptionpublic final void writeLong(long v)
throws IOException
IOExceptionpublic final void writeFloat(float v)
throws IOException
IOExceptionpublic final void writeDouble(double v)
throws IOException
IOExceptionpublic final void writeBytes(String s) throws IOException
IOExceptionpublic final void writeChars(String s) throws IOException
IOExceptionpublic final void writeUTF(String str) throws IOException
IOExceptionpublic boolean hasUnFlushedData()
DataOutputStreamhasUnFlushedData in class DataOutputStreamCopyright © 2008–2023 Apache Software Foundation. All rights reserved.