Class Utils


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

      Constructors 
      Constructor Description
      Utils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static java.nio.ByteBuffer appendBuffers​(java.nio.ByteBuffer buffer, java.nio.ByteBuffer buffer1, int incomingBufferSize, int BUFFER_STEP_SIZE)
      Concatenates two buffers into one.
      (package private) static int getPort​(java.net.URI uri)  
      (package private) static java.nio.ByteBuffer split​(java.nio.ByteBuffer buffer, int position)  
      • Methods inherited from class java.lang.Object

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

      • Utils

        public Utils()
    • Method Detail

      • appendBuffers

        static java.nio.ByteBuffer appendBuffers​(java.nio.ByteBuffer buffer,
                                                 java.nio.ByteBuffer buffer1,
                                                 int incomingBufferSize,
                                                 int BUFFER_STEP_SIZE)
        Concatenates two buffers into one. If buffer given as first argument has enough space for putting the other one, it will be done and the original buffer will be returned. Otherwise new buffer will be created.
        Parameters:
        buffer - first buffer.
        buffer1 - second buffer.
        Returns:
        concatenation.
      • split

        static java.nio.ByteBuffer split​(java.nio.ByteBuffer buffer,
                                         int position)
      • getPort

        static int getPort​(java.net.URI uri)