private ByteBuffer getBytes(int address, int length) throws IOException {
      lockBuffer();
      try {
        ByteBuffer duplicate = bufferWrapper.copy();

        int newPosition = address + addressInBuffer;
        duplicate.position(newPosition);
        duplicate.limit(newPosition + length);
        return duplicate;
      }
      finally {
        unlockBuffer();
      }
    }
private ByteBuffer getBytes(int address, int length)