public class OutputStreamBufferOutput extends Object implements BufferOutput
| Constructor and Description |
|---|
OutputStreamBufferOutput(DataOutputStream os) |
OutputStreamBufferOutput(OutputStream os) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
BufferOutput |
flush()
Flushes the buffer to the underlying persistence layer.
|
BufferOutput |
write(Buffer buffer)
Writes a buffer to the buffer.
|
BufferOutput |
write(byte[] bytes)
Writes an array of bytes to the buffer.
|
BufferOutput |
write(byte[] bytes,
long offset,
long length)
Writes an array of bytes to the buffer.
|
BufferOutput |
write(Bytes bytes)
Writes an array of bytes to the buffer.
|
BufferOutput |
write(Bytes bytes,
long offset,
long length)
Writes an array of bytes to the buffer.
|
BufferOutput |
writeBoolean(boolean b)
Writes a 1 byte boolean to the buffer.
|
BufferOutput |
writeByte(int b)
Writes a byte to the buffer.
|
BufferOutput |
writeChar(char c)
Writes a 16-bit character to the buffer.
|
BufferOutput |
writeDouble(double d)
Writes a double-precision 64-bit floating point number to the buffer.
|
BufferOutput |
writeFloat(float f)
Writes a single-precision 32-bit floating point number to the buffer.
|
BufferOutput |
writeInt(int i)
Writes a 32-bit signed integer to the buffer.
|
BufferOutput |
writeLong(long l)
Writes a 64-bit signed integer to the buffer.
|
BufferOutput |
writeMedium(int m)
Writes a 24-bit signed integer to the buffer.
|
BufferOutput |
writeShort(short s)
Writes a 16-bit signed integer to the buffer.
|
BufferOutput |
writeString(String s)
Writes a string to the buffer.
|
BufferOutput |
writeUnsignedByte(int b)
Writes an unsigned byte to the buffer.
|
BufferOutput |
writeUnsignedInt(long i)
Writes a 32-bit unsigned integer to the buffer.
|
BufferOutput |
writeUnsignedMedium(int m)
Writes a 24-bit unsigned integer to the buffer.
|
BufferOutput |
writeUnsignedShort(int s)
Writes a 16-bit unsigned integer to the buffer.
|
BufferOutput |
writeUTF8(String s)
Writes a UTF-8 string to the buffer.
|
public OutputStreamBufferOutput(OutputStream os)
public OutputStreamBufferOutput(DataOutputStream os)
public BufferOutput write(Bytes bytes)
BufferOutputwrite in interface BufferOutputbytes - The array of bytes to write.public BufferOutput write(byte[] bytes)
BufferOutputwrite in interface BufferOutputbytes - The array of bytes to write.public BufferOutput write(Bytes bytes, long offset, long length)
BufferOutputwrite in interface BufferOutputbytes - The array of bytes to write.offset - The offset at which to start writing the bytes.length - The number of bytes from the provided byte array to write to the buffer.public BufferOutput write(byte[] bytes, long offset, long length)
BufferOutputwrite in interface BufferOutputbytes - The array of bytes to write.offset - The offset at which to start writing the bytes.length - The number of bytes from the provided byte array to write to the buffer.public BufferOutput write(Buffer buffer)
BufferOutputwrite in interface BufferOutputbuffer - The buffer to write.public BufferOutput writeByte(int b)
BufferOutputwriteByte in interface BufferOutputb - The byte to write.public BufferOutput writeUnsignedByte(int b)
BufferOutputwriteUnsignedByte in interface BufferOutputb - The byte to write.public BufferOutput writeChar(char c)
BufferOutputwriteChar in interface BufferOutputc - The character to write.public BufferOutput writeShort(short s)
BufferOutputwriteShort in interface BufferOutputs - The short to write.public BufferOutput writeUnsignedShort(int s)
BufferOutputwriteUnsignedShort in interface BufferOutputs - The short to write.public BufferOutput writeMedium(int m)
BufferOutputwriteMedium in interface BufferOutputm - The integer to write.public BufferOutput writeUnsignedMedium(int m)
BufferOutputwriteUnsignedMedium in interface BufferOutputm - The integer to write.public BufferOutput writeInt(int i)
BufferOutputwriteInt in interface BufferOutputi - The integer to write.public BufferOutput writeUnsignedInt(long i)
BufferOutputwriteUnsignedInt in interface BufferOutputi - The integer to write.public BufferOutput writeLong(long l)
BufferOutputwriteLong in interface BufferOutputl - The long to write.public BufferOutput writeFloat(float f)
BufferOutputwriteFloat in interface BufferOutputf - The float to write.public BufferOutput writeDouble(double d)
BufferOutputwriteDouble in interface BufferOutputd - The double to write.public BufferOutput writeBoolean(boolean b)
BufferOutputwriteBoolean in interface BufferOutputb - The boolean to write.public BufferOutput writeString(String s)
BufferOutputwriteString in interface BufferOutputs - The string to write.public BufferOutput writeUTF8(String s)
BufferOutputwriteUTF8 in interface BufferOutputs - The string to write.public BufferOutput flush()
BufferOutputflush in interface BufferOutputpublic void close()
close in interface AutoCloseableclose in interface BufferOutputCopyright © 2013–2015. All rights reserved.