Package yapion.io

Class 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 OutputStream
      void 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • YAPIONOutputStream

        public YAPIONOutputStream​(java.io.OutputStream outputStream)
        Creates a YAPIONOutputStream from an OutputStream.
        Parameters:
        outputStream - 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 Object
        state - 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 interface java.lang.AutoCloseable
        Throws:
        java.io.IOException - by OutputStream.close()
      • flush

        public void flush()
                   throws java.io.IOException
        Flushes the OutputStream
        Throws:
        java.io.IOException - by OutputStream.flush()