Class StreamSegment

java.lang.Object
com.github.jaiimageio.stream.StreamSegment

public class StreamSegment extends Object
A utility class representing a segment within a stream as a long starting position and an int length.
  • Field Details

    • startPos

      private long startPos
    • segmentLength

      private int segmentLength
  • Constructor Details

    • StreamSegment

      public StreamSegment()
      Constructs a StreamSegment. The starting position and length are set to 0.
    • StreamSegment

      public StreamSegment(long startPos, int segmentLength)
      Constructs a StreamSegment with a given starting position and length.
      Parameters:
      startPos - The initial position of the segment.
      segmentLength - The length of the segment.
  • Method Details

    • getStartPos

      public final long getStartPos()
      Returns the starting position of the segment.
      Returns:
      The initial position of the segment.
      See Also:
    • setStartPos

      public final void setStartPos(long startPos)
      Sets the starting position of the segment.
      Parameters:
      startPos - The initial position of the segment.
      See Also:
    • getSegmentLength

      public final int getSegmentLength()
      Returns the length of the segment.
      Returns:
      The length of the segment.
      See Also:
    • setSegmentLength

      public final void setSegmentLength(int segmentLength)
      Sets the length of the segment.
      Parameters:
      segmentLength - The length of the segment.
      See Also: