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 void
close()
Closes the OutputStream.void
flush()
Flushes the OutputStreamvoid
write(java.lang.Object object)
Writing the Object to the OutputStream.void
write(java.lang.Object object, java.lang.String state)
Writing the Object to the OutputStream with a specific state.void
write(YAPIONObject yapionObject)
Writing the YAPIONObject to the OutputStream.void
write(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.IOException
Closes the OutputStream.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.io.IOException
- byOutputStream.close()
-
flush
public void flush() throws java.io.IOException
Flushes the OutputStream- Throws:
java.io.IOException
- byOutputStream.flush()
-
-