Package io.deephaven.io.streams
Class ByteBufferStreams.Output
java.lang.Object
java.io.OutputStream
io.deephaven.io.streams.ByteBufferStreams.Output
- All Implemented Interfaces:
Closeable,DataOutput,Flushable,AutoCloseable
- Enclosing class:
- ByteBufferStreams
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOutput(ByteBuffer b, ByteBufferStreams.Sink sink) Returns a new Output stream with the specified initial buffer and sink. -
Method Summary
Modifier and TypeMethodDescriptionappendBytes(CharSequence s, int position, int len) appendChars(CharSequence s, int position, int len) voidclose()voidflush()voidInstall a new buffer for all future writes.voidInstall a new sink for all future writes.voidwrite(byte[] ba) voidwrite(byte[] ba, int off, int len) voidwrite(int b) voidwrite(ByteBuffer b) voidwriteBoolean(boolean v) voidwriteByte(int v) voidwriteBytes(String s) voidwriteChar(int v) voidwriteChars(String s) voidwriteDouble(double d) voidwriteFloat(float f) voidwriteInt(int v) voidwriteLong(long v) voidwriteShort(int v) voidMethods inherited from class java.io.OutputStream
nullOutputStream
-
Field Details
-
buf
-
sink
-
-
Constructor Details
-
Output
Returns a new Output stream with the specified initial buffer and sink.- Parameters:
b-sink-
-
-
Method Details
-
setBuffer
Install a new buffer for all future writes. -
setSink
Install a new sink for all future writes. -
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classOutputStream- Throws:
IOException
-
flush
- Specified by:
flushin interfaceFlushable- Overrides:
flushin classOutputStream- Throws:
IOException
-
write
- Specified by:
writein interfaceDataOutput- Specified by:
writein classOutputStream- Throws:
IOException
-
write
- Specified by:
writein interfaceDataOutput- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Specified by:
writein interfaceDataOutput- Overrides:
writein classOutputStream- Throws:
IOException
-
write
- Throws:
IOException
-
writeBoolean
- Specified by:
writeBooleanin interfaceDataOutput- Throws:
IOException
-
writeByte
- Specified by:
writeBytein interfaceDataOutput- Throws:
IOException
-
writeShort
- Specified by:
writeShortin interfaceDataOutput- Throws:
IOException
-
writeChar
- Specified by:
writeCharin interfaceDataOutput- Throws:
IOException
-
writeInt
- Specified by:
writeIntin interfaceDataOutput- Throws:
IOException
-
writeLong
- Specified by:
writeLongin interfaceDataOutput- Throws:
IOException
-
writeFloat
- Specified by:
writeFloatin interfaceDataOutput- Throws:
IOException
-
writeDouble
- Specified by:
writeDoublein interfaceDataOutput- Throws:
IOException
-
writeBytes
- Specified by:
writeBytesin interfaceDataOutput- Throws:
IOException
-
writeChars
- Specified by:
writeCharsin interfaceDataOutput- Throws:
IOException
-
writeUTF
- Specified by:
writeUTFin interfaceDataOutput- Throws:
IOException
-
appendChars
- Throws:
IOException
-
appendChars
public ByteBufferStreams.Output appendChars(CharSequence s, int position, int len) throws IOException - Throws:
IOException
-
appendBytes
- Throws:
IOException
-
appendBytes
public ByteBufferStreams.Output appendBytes(CharSequence s, int position, int len) throws IOException - Throws:
IOException
-