public static ByteSource create(StoredObject so) {
      // Since I found a way to create a DirectByteBuffer (using reflection) from a StoredObject
      // we might not even need the ByteSource abstraction any more.
      // But it is possible that createByteBuffer will not work on a different jdk so keep it for
      // now.
      ByteBuffer bb = so.createDirectByteBuffer();
      if (bb != null) {
        return create(bb);
      } else {
        return new OffHeapByteSource(so);
      }
    }
Returns the ByteBuffer that this ByteSource wraps; null if no ByteBuffer
geode-core/src/main/java/org/apache/geode/internal/tcp/ByteBufferInputStream.java