docs: static byte[] readFully(DataInput stream, int len) throws IOException {
          if (len == 0) {
              return null;
          }
  
          byte[] data = new byte[len];
          stream.readFully(data);
          return data;
      }