code: ByteBuffer writeView(int position, int needs) throws IOException
      {
          int waterMark = position+needs;
          if (waterMark > content.capacity())
          {
              if (refSet.containsKey(content))
              {
                  throw new IOException("cannot grow file because of writable mapping for content. (non carbage collected mapping?)");
              }
              int blockSize = fileStore.getBlockSize();
              int newCapacity = Math.max(((waterMark / blockSize) + 1) * blockSize, 2*content.capacity());
              ByteBuffer newBB = ByteBuffer.allocateDirect(newCapacity);
              newBB.put(content);
              newBB.flip();
              content = newBB;
          }
          ByteBuffer bb = content.duplicate();
          refSet.add(content, bb);
          bb.limit(waterMark).position(position);
          return bb;
      }
docs: Returns view of content.
  @return ByteBuffer position set to given position limit is position+needs.