@Override
  public int read(byte[] bytesBuffer, int offset, int length) throws IOException {
    return readInternal(new ByteArrayTargetBuffer(bytesBuffer, offset), offset, length,
        ReadType.READ_INTO_BYTE_ARRAY, mPosition, false);
  }
@Test
  public void readEmptyFileThroughReadByteBuffer() throws Exception {
    int fileSize = 0;
    byte[] fileData = BufferUtils.getIncreasingByteArray(fileSize);
    ByteArrayCacheManager manager = new ByteArrayCacheManager();
    LocalCacheFileInStream stream = setupWithSingleFile(fileData, manager);

    byte[] readData = new byte[fileSize];
    ByteBuffer buffer = ByteBuffer.wrap(readData);
    int totalBytesRead = stream.read(buffer, 0, fileSize + 1);
    Assert.assertEquals(-1, totalBytesRead);
  }