public class DataRange extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
threshold
Once more than
threshold bytes are written to data, the backing store is
switched from a byte array to a temporary file |
| Constructor and Description |
|---|
DataRange(Range range,
InputStream instream)
Sets the range equal to the specified Range and pulls a number of bytes
from the InputStream equal to the size of the range
|
DataRange(Range range,
RandomAccessFile randAccess)
Sets the range to the specified Range and seeks to the beginning of the
range in the RandomAccessFile before copying bytes
|
| Modifier and Type | Method and Description |
|---|---|
InputStream |
getInputStream()
Returns the stream of bytes.
|
long |
getLength()
Returns the length of the Range (and the number of bytes in the byte
stream)
|
Range |
getRange() |
String |
toString() |
public static final int threshold
threshold bytes are written to data, the backing store is
switched from a byte array to a temporary filepublic DataRange(Range range, InputStream instream) throws IOException
range - A Range object specifying the target location of the byte
streaminstream - A stream from which the data portion will be pulledIOExceptionpublic DataRange(Range range, RandomAccessFile randAccess) throws IOException
range - randAccess - IOExceptionpublic Range getRange()
public InputStream getInputStream()
rangepublic long getLength()
Copyright © 2021 McEvoy Software Ltd. All rights reserved.