code: private HDFSSegmentHandle asWritableHandle(SegmentHandle handle) {
          Preconditions.checkArgument(!handle.isReadOnly(), "handle must not be read-only.");
          return asReadableHandle(handle);
      }
docs: Casts the given handle as a HDFSSegmentHandle that has isReadOnly == false.