code: @Override
      public synchronized void write (byte[] bytes, long storageIndex) throws IOException {
          final int bucketIndex = (int) (storageIndex / SIZE_PER_BUCKET);
          final int bucketOffset = (int) (storageIndex % SIZE_PER_BUCKET);
          try {
  
              // // DEBUG CODE
              // writer.write(bucketIndex + "," + storageIndex + "," +
              // bucketOffset + "," + bytes.length +
              // "\n");
              // writer.flush();
  
              byte[] data = mByteCache.getIfPresent(bucketIndex);
              if (data == null) {
                  data = getAndprefetchBuckets(bucketIndex);
              }
  
              System.arraycopy(bytes, 0, data, bucketOffset, bytes.length + bucketOffset > SIZE_PER_BUCKET ? SIZE_PER_BUCKET - bucketOffset
                      : bytes.length);
              storeBucket(bucketIndex, data);
              mByteCache.put(bucketIndex, data);
  
              if (bucketOffset + bytes.length > SIZE_PER_BUCKET) {
                  data = mByteCache.getIfPresent(bucketIndex + 1);
                  if (data == null) {
                      data = getAndprefetchBuckets(bucketIndex + 1);
                  }
  
                  System.arraycopy(bytes, SIZE_PER_BUCKET - bucketOffset, data, 0, bytes.length - (SIZE_PER_BUCKET - bucketOffset));
                  storeBucket(bucketIndex + 1, data);
                  mByteCache.put(bucketIndex + 1, data);
              }
          } catch (ExecutionException | InterruptedException exc) {
              throw new IOException(exc);
          }
      }
docs: {@inheritDoc}
  
  @throws Exception