class StreamSegmentMapperImpl extends Object implements StreamSegmentMapper
StreamSegmentMapper
interface
that requires an explicit list of the starting locations and
lengths of the source segments.Modifier and Type | Field and Description |
---|---|
private int[] |
segmentLengths |
private long[] |
segmentPositions |
Constructor and Description |
---|
StreamSegmentMapperImpl(long[] segmentPositions,
int[] segmentLengths) |
Modifier and Type | Method and Description |
---|---|
StreamSegment |
getStreamSegment(long position,
int length)
Returns a
StreamSegment object indicating the
location of the initial portion of a desired segment in the
source stream. |
void |
getStreamSegment(long position,
int length,
StreamSegment seg)
Sets the values of a
StreamSegment object
indicating the location of the initial portion of a desired
segment in the source stream. |
(package private) long |
length() |
private long[] segmentPositions
private int[] segmentLengths
public StreamSegmentMapperImpl(long[] segmentPositions, int[] segmentLengths)
public StreamSegment getStreamSegment(long position, int length)
StreamSegmentMapper
StreamSegment
object indicating the
location of the initial portion of a desired segment in the
source stream. The length of the returned
StreamSegment
may be smaller than the desired
length.getStreamSegment
in interface StreamSegmentMapper
position
- The desired starting position in the
SegmentedImageInputStream
, as a long
.length
- The desired segment length.public void getStreamSegment(long position, int length, StreamSegment seg)
StreamSegmentMapper
StreamSegment
object
indicating the location of the initial portion of a desired
segment in the source stream. The length of the returned
StreamSegment
may be smaller than the desired
length.getStreamSegment
in interface StreamSegmentMapper
position
- The desired starting position in the
SegmentedImageInputStream
, as a long
.length
- The desired segment length.seg
- A StreamSegment
object to be overwritten.long length()
Copyright © 2016 Open Microscopy Environment