code: static public byte[] readValue(ObjectInput in, int len) throws IOException {
          int bytesRead = 0;
          byte[] data = new byte[len];
          for (int offset = 0; offset < len; offset += bytesRead) {
              bytesRead = in.read(data, offset, len - offset);
              if (bytesRead == -1) {
                  throw new IOException("Could not retrieve ");
              }
          }
          return data;
      }
docs: Encapsulate the logic to read an entire byte array from the input stream.
  
  @param in
  @param len
  @return new array read from stream
  @throws IOException