Package yapion.io
Class YAPIONOutputStream
- java.lang.Object
-
- yapion.io.YAPIONOutputStream
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class YAPIONOutputStream extends java.lang.Object implements java.lang.AutoCloseable
-
-
Constructor Summary
Constructors Constructor Description YAPIONOutputStream(java.io.OutputStream outputStream)Creates a YAPIONOutputStream from an OutputStream.
-
Method Summary
Modifier and Type Method Description voidclose()Closes the OutputStream.voidflush()Flushes the OutputStreamvoidwrite(java.lang.Object object)Writing the Object to the OutputStream.voidwrite(java.lang.Object object, java.lang.String state)Writing the Object to the OutputStream with a specific state.voidwrite(YAPIONObject yapionObject)Writing the YAPIONObject to the OutputStream.voidwrite(YAPIONPacket yapionPacket)Writing the YAPIONPacket to the OutputStream.
-
-
-
Method Detail
-
write
public void write(YAPIONObject yapionObject)
Writing the YAPIONObject to the OutputStream.- Parameters:
yapionObject- the YAPIONObject- Throws:
YAPIONIOException- if the outputStream was closed
-
write
public void write(YAPIONPacket yapionPacket)
Writing the YAPIONPacket to the OutputStream.- Parameters:
yapionPacket- the YAPIONPacket- Throws:
YAPIONIOException- if the outputStream was closed
-
write
public void write(java.lang.Object object)
Writing the Object to the OutputStream.- Parameters:
object- the Object- Throws:
YAPIONIOException- if the outputStream was closed
-
write
public void write(java.lang.Object object, java.lang.String state)Writing the Object to the OutputStream with a specific state.- Parameters:
object- the Objectstate- the specified state- Throws:
YAPIONIOException- if the outputStream was closed
-
close
public void close() throws java.io.IOExceptionCloses the OutputStream.- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.io.IOException- byOutputStream.close()
-
flush
public void flush() throws java.io.IOExceptionFlushes the OutputStream- Throws:
java.io.IOException- byOutputStream.flush()
-
-