public static SettableUncompressedStream createSettableUncompressedStream(String streamName,
      ColumnStreamData streamBuffer) {
    if (streamBuffer == null) {
      return null;
    }

    if (streamBuffer.getCacheBuffers() != null) {
      DiskRangeInfo diskRangeInfo = createDiskRangeInfo(streamBuffer);
      return new SettableUncompressedStream(streamName, diskRangeInfo.getDiskRanges(),
          diskRangeInfo.getTotalLength());
    } else {
      return new SettableUncompressedStream(streamName, new DiskRangeList(0,0), 0);
    }
  }
Create SettableUncompressedStream from stream buffer.

@param streamName - stream name
@param streamBuffer - stream buffer
@return - SettableUncompressedStream
ql/src/java/org/apache/hadoop/hive/ql/io/orc/encoded/StreamUtils.java