Class StreamCutInternal

  • All Implemented Interfaces:
    StreamCut, java.io.Serializable
    Direct Known Subclasses:
    StreamCutImpl

    public abstract class StreamCutInternal
    extends java.lang.Object
    implements StreamCut
    This is an abstract class which acts an intermediate class to make the actual StreamCut implementation opaque.
    See Also:
    Serialized Form
    • Constructor Detail

      • StreamCutInternal

        public StreamCutInternal()
    • Method Detail

      • getStream

        public abstract Stream getStream()
        Get Stream for the StreamCut.
        Returns:
        The stream.
      • getPositions

        public abstract java.util.Map<Segment,​java.lang.Long> getPositions()
        Get a mapping of Segment and its offset.
        Returns:
        Map of Segment to its offset.
      • fromBytes

        public static StreamCutInternal fromBytes​(java.nio.ByteBuffer cut)
        Description copied from interface: StreamCut
        Deserializes the cut from its serialized from obtained from calling StreamCut.toBytes().
        Parameters:
        cut - A serialized position.
        Returns:
        The StreamCut object.
      • from

        public static StreamCutInternal from​(java.lang.String cut)
        Description copied from interface: StreamCut
        Obtains the a StreamCut object from its Base64 representation obtained via StreamCut.asText().
        Parameters:
        cut - Base64 representation of StreamCut obtained using StreamCut.asText()
        Returns:
        The StreamCut object