code: public static long parseInteger(InputStream inputStream, final int size) throws IOException {
          byte[] buffer = new byte[size];
          int numberOfReadsBytes = inputStream.read(buffer, 0, size);
          assert numberOfReadsBytes == size;
  
          long value = buffer[0] & (long) 0xff;
          for (int i = 1; i < size; ++i) {
              value = (value << BIT_IN_BYTE) | ((long) buffer[i] & (long) 0xff);
          }
  
          return value;
      }
docs: method used to parse : int, uint and date
  
  @param inputStream
  - stream to get value
  @param size
  - size of the value in bytes
  @return - parsed value as long
  @throws IOException
  - in case of IO error