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
-
Constructor Summary
ConstructorDescriptionOutput
(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) void
close()
void
flush()
void
Install a new buffer for all future writes.void
Install a new sink for all future writes.void
write
(byte[] ba) void
write
(byte[] ba, int off, int len) void
write
(int b) void
write
(ByteBuffer b) void
writeBoolean
(boolean v) void
writeByte
(int v) void
writeBytes
(String s) void
writeChar
(int v) void
writeChars
(String s) void
writeDouble
(double d) void
writeFloat
(float f) void
writeInt
(int v) void
writeLong
(long v) void
writeShort
(int v) void
Methods 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classOutputStream
- Throws:
IOException
-
flush
- Specified by:
flush
in interfaceFlushable
- Overrides:
flush
in classOutputStream
- Throws:
IOException
-
write
- Specified by:
write
in interfaceDataOutput
- Specified by:
write
in classOutputStream
- Throws:
IOException
-
write
- Specified by:
write
in interfaceDataOutput
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
- Specified by:
write
in interfaceDataOutput
- Overrides:
write
in classOutputStream
- Throws:
IOException
-
write
- Throws:
IOException
-
writeBoolean
- Specified by:
writeBoolean
in interfaceDataOutput
- Throws:
IOException
-
writeByte
- Specified by:
writeByte
in interfaceDataOutput
- Throws:
IOException
-
writeShort
- Specified by:
writeShort
in interfaceDataOutput
- Throws:
IOException
-
writeChar
- Specified by:
writeChar
in interfaceDataOutput
- Throws:
IOException
-
writeInt
- Specified by:
writeInt
in interfaceDataOutput
- Throws:
IOException
-
writeLong
- Specified by:
writeLong
in interfaceDataOutput
- Throws:
IOException
-
writeFloat
- Specified by:
writeFloat
in interfaceDataOutput
- Throws:
IOException
-
writeDouble
- Specified by:
writeDouble
in interfaceDataOutput
- Throws:
IOException
-
writeBytes
- Specified by:
writeBytes
in interfaceDataOutput
- Throws:
IOException
-
writeChars
- Specified by:
writeChars
in interfaceDataOutput
- Throws:
IOException
-
writeUTF
- Specified by:
writeUTF
in 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
-