Class StreamUtil


  • public class StreamUtil
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      StreamUtil()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void read​(byte[] data, Readable readable)  
      static byte[] readAll​(java.io.InputStream is)  
      static void readAll​(java.io.InputStream in, byte[] data)  
      static void readAll​(java.io.InputStream in, byte[] data, int offset, int length)  
      static java.lang.Object readObject​(byte[] data)  
      static void write​(java.io.InputStream in, java.io.OutputStream out, int length)  
      static byte[] write​(Writable writable)  
      static byte[] writeObject​(java.lang.Object object)  
      • Methods inherited from class java.lang.Object

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

      • StreamUtil

        public StreamUtil()
    • Method Detail

      • readAll

        public static final void readAll​(java.io.InputStream in,
                                         byte[] data,
                                         int offset,
                                         int length)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • readAll

        public static final byte[] readAll​(java.io.InputStream is)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • writeObject

        public static final byte[] writeObject​(java.lang.Object object)
                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • readObject

        public static final java.lang.Object readObject​(byte[] data)
                                                 throws java.io.IOException,
                                                        java.lang.ClassNotFoundException
        Throws:
        java.io.IOException
        java.lang.ClassNotFoundException
      • write

        public static byte[] write​(Writable writable)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • read

        public static void read​(byte[] data,
                                Readable readable)
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • readAll

        public static void readAll​(java.io.InputStream in,
                                   byte[] data)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • write

        public static void write​(java.io.InputStream in,
                                 java.io.OutputStream out,
                                 int length)
                          throws java.io.IOException
        Throws:
        java.io.IOException