Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.ydp.jai
Class SectorStreamSegmentMapper  view SectorStreamSegmentMapper download SectorStreamSegmentMapper.java

java.lang.Object
  extended byorg.ydp.jai.SectorStreamSegmentMapper
All Implemented Interfaces:
StreamSegmentMapper

class SectorStreamSegmentMapper
extends java.lang.Object
implements StreamSegmentMapper

An implementation of the StreamSegmentMapper interface for segments of equal length.


Field Summary
(package private)  int lastSegmentLength
           
(package private)  int segmentLength
           
(package private)  long[] segmentPositions
           
(package private)  int totalLength
           
 
Constructor Summary
SectorStreamSegmentMapper(long[] segmentPositions, int segmentLength, int totalLength)
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

segmentPositions

long[] segmentPositions

segmentLength

int segmentLength

totalLength

int totalLength

lastSegmentLength

int lastSegmentLength
Constructor Detail

SectorStreamSegmentMapper

public SectorStreamSegmentMapper(long[] segmentPositions,
                                 int segmentLength,
                                 int totalLength)
Method Detail

getStreamSegment

public StreamSegment getStreamSegment(long position,
                                      int length)
Description copied from interface: StreamSegmentMapper
Returns a 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.

Specified by:
getStreamSegment in interface StreamSegmentMapper

getStreamSegment

public void getStreamSegment(long position,
                             int length,
                             StreamSegment seg)
Description copied from interface: StreamSegmentMapper
Sets the values of a 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.

Specified by:
getStreamSegment in interface StreamSegmentMapper