private static ByteString wrap(ByteBuffer b, int offset, int length) {
    ByteBuffer dup = b.duplicate();
    dup.position(offset);
    dup.limit(offset + length);
    return UnsafeByteOperations.unsafeWrap(dup);
  }
Unwraps an exception from a protobuf service into the underlying (expected) IOException. This
method will <strong>always</strong> throw an exception.
@param se the {@code ServiceException} instance to convert into an {@code IOException}
@throws NullPointerException if {@code se} is {@code null}
hbase-client/src/main/java/org/apache/hadoop/hbase/shaded/protobuf/ProtobufUtil.java