Package cn.sliew.milky.common.io.stream
Class OutputStreamStreamOutput
- java.lang.Object
-
- java.io.OutputStream
-
- cn.sliew.milky.common.io.stream.StreamOutput
-
- cn.sliew.milky.common.io.stream.OutputStreamStreamOutput
-
- All Implemented Interfaces:
Closeable,Flushable,AutoCloseable
public class OutputStreamStreamOutput extends StreamOutput
-
-
Constructor Summary
Constructors Constructor Description OutputStreamStreamOutput(OutputStream out)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes this stream to further operations.voidflush()Forces any buffered output to be written.voidreset()voidwriteByte(byte b)Writes a single byte.voidwriteBytes(byte[] b, int offset, int length)Writes an array of bytes.-
Methods inherited from class cn.sliew.milky.common.io.stream.StreamOutput
write, write, writeBoolean, writeBytes, writeBytes, writeDouble, writeFloat, writeGenericValue, writeInt, writeLong, writeOptionalBoolean, writeOptionalDouble, writeOptionalFloat, writeOptionalInt, writeOptionalLong, writeOptionalVInt, writeOptionalVLong, writeShort, writeVInt, writeVLong, writeZLong
-
Methods inherited from class java.io.OutputStream
nullOutputStream, write
-
-
-
-
Constructor Detail
-
OutputStreamStreamOutput
public OutputStreamStreamOutput(OutputStream out)
-
-
Method Detail
-
close
public void close() throws IOExceptionDescription copied from class:StreamOutputCloses this stream to further operations.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classStreamOutput- Throws:
IOException
-
flush
public void flush() throws IOExceptionDescription copied from class:StreamOutputForces any buffered output to be written.- Specified by:
flushin interfaceFlushable- Specified by:
flushin classStreamOutput- Throws:
IOException
-
reset
public void reset() throws IOException- Specified by:
resetin classStreamOutput- Throws:
IOException
-
writeByte
public void writeByte(byte b) throws IOExceptionDescription copied from class:StreamOutputWrites a single byte.- Specified by:
writeBytein classStreamOutput- Throws:
IOException
-
writeBytes
public void writeBytes(byte[] b, int offset, int length) throws IOExceptionDescription copied from class:StreamOutputWrites an array of bytes.- Specified by:
writeBytesin classStreamOutput- Parameters:
b- the bytes to writeoffset- the offset in the byte arraylength- the number of bytes to write- Throws:
IOException
-
-