Class HalfDuplexProtoIO

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, org.marid.io.IOCloseable, ProtoIO

    public class HalfDuplexProtoIO
    extends java.lang.Object
    implements ProtoIO
    Since:
    0.8
    Author:
    Dmitry Ovchinnikov.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> T call​(org.marid.io.IOBiFunction<java.io.InputStream,​java.io.OutputStream,​T> function)  
      void close()  
      void doWith​(org.marid.io.IOBiConsumer<java.io.InputStream,​java.io.OutputStream> consumer)  
      java.io.InputStream getInputStream()  
      java.io.OutputStream getOutputStream()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.marid.io.IOCloseable

        closeSafely
    • Constructor Detail

      • HalfDuplexProtoIO

        public HalfDuplexProtoIO​(ProtoIO delegate)
    • Method Detail

      • getInputStream

        public java.io.InputStream getInputStream()
        Specified by:
        getInputStream in interface ProtoIO
      • getOutputStream

        public java.io.OutputStream getOutputStream()
        Specified by:
        getOutputStream in interface ProtoIO
      • doWith

        public void doWith​(org.marid.io.IOBiConsumer<java.io.InputStream,​java.io.OutputStream> consumer)
                    throws java.io.IOException
        Specified by:
        doWith in interface ProtoIO
        Throws:
        java.io.IOException
      • call

        public <T> T call​(org.marid.io.IOBiFunction<java.io.InputStream,​java.io.OutputStream,​T> function)
                   throws java.io.IOException
        Specified by:
        call in interface ProtoIO
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException