Class DataStreamUtil


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

      Constructors 
      Constructor Description
      DataStreamUtil()  
    • Method Summary

      Modifier and Type Method Description
      static byte[] readByteArrayWithLengthHeader​(java.io.DataInputStream dataInputStream)  
      static java.lang.String readStringWithLengthHeader​(java.io.DataInputStream dataInputStream)  
      static void writeByteArrayWithLengthHeader​(java.io.DataOutputStream dataOutputStream, byte[] bytes)  
      static void writeStringWithLengthHeader​(java.io.DataOutputStream dataOutputStream, java.lang.String value)  
      • Methods inherited from class java.lang.Object

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

      • DataStreamUtil

        public DataStreamUtil()
    • Method Detail

      • writeStringWithLengthHeader

        public static void writeStringWithLengthHeader​(java.io.DataOutputStream dataOutputStream,
                                                       java.lang.String value)
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • readStringWithLengthHeader

        public static java.lang.String readStringWithLengthHeader​(java.io.DataInputStream dataInputStream)
                                                           throws java.io.IOException
        Throws:
        java.io.IOException
      • writeByteArrayWithLengthHeader

        public static void writeByteArrayWithLengthHeader​(java.io.DataOutputStream dataOutputStream,
                                                          byte[] bytes)
                                                   throws java.io.IOException
        Throws:
        java.io.IOException
      • readByteArrayWithLengthHeader

        public static byte[] readByteArrayWithLengthHeader​(java.io.DataInputStream dataInputStream)
                                                    throws java.io.IOException
        Throws:
        java.io.IOException