code: public int fillFromChannel(
              ReadableByteChannel channel) throws IOException {
          if (!(backing instanceof ByteBuffer)) {
              throw new IllegalArgumentException(
                  "Backing buffer is not a ByteBuffer.");
          }
          try {
              return channel.read((ByteBuffer) backing);
          } catch (IOException e) {
              unlockBuffer();
              throw e;
          }
      }
docs: Convenience method to fill the buffer from the channel.
  Unlocks the buffer if an {@link IOException} occurs.
  This method may only be invoked for {@link ManagedBuffer}s
  backed by a {@link ByteBuffer}.
  
  @param channel the channel
  @return the bytes read
  @throws IOException Signals that an I/O exception has occurred.