code: public byte[] getByteArray() {
          int lengthToCopy = getInt();
          byte[] byteArray = (lengthToCopy == 0) ? null : new byte[lengthToCopy];
          getBytes(lengthToCopy, byteArray, 0);
          return byteArray;
      }
docs: Get a counted array of bytes from the buffer
  
  @return bytes