code: public static String parseString(InputStream inputStream, final int size) throws IOException {
          if (0 == size) {
              return "";
          }
  
          byte[] buffer = new byte[size];
          int numberOfReadsBytes = inputStream.read(buffer, 0, size);
          assert numberOfReadsBytes == size;
  
          return new String(buffer, "UTF-8");
      }
docs: method used to parse string
  
  @param inputStream
  - stream to get value
  @param size
  - size of the value in bytes
  @return - parsed value as {@link String}
  @throws IOException
  - in case of IO error