|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.google.appengine.api.blobstore.ByteRange
public class ByteRange
A byte range as parsed from a request Range header. Format produced by this class is also compatible with the X-AppEngine-BlobRange header, used for serving sub-ranges of blobs.
Constructor Summary | |
---|---|
ByteRange(long start)
Constructor. |
|
ByteRange(long start,
long end)
Constructor. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object object)
Two ByteRange objects are considered equal if they have the same start and end. |
long |
getEnd()
Get end index of byte range. |
long |
getStart()
Get start index of byte range. |
boolean |
hasEnd()
Indicates whether or not this byte range indicates an end. |
int |
hashCode()
|
static ByteRange |
parse(java.lang.String byteRange)
Parse byte range from header. |
static ByteRange |
parseContentRange(java.lang.String contentRange)
Parse content range from header for byte-range only. |
java.lang.String |
toString()
Format byte range for use in header. |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ByteRange(long start)
start
- Start index of blob range to serve. If negative, serve the last abs(start) bytes
of the blob.public ByteRange(long start, long end)
start
- Start index of blob range to serve. May not be negative.end
- End index of blob range to serve. Index is inclusive, meaning the byte indicated
by end is included in the response.Method Detail |
---|
public boolean hasEnd()
public long getStart()
public long getEnd()
java.lang.IllegalStateException
- if byte range does not have an end range.public java.lang.String toString()
toString
in class java.lang.Object
public static ByteRange parse(java.lang.String byteRange)
byteRange
- Byte range string as received from header.
RangeFormatException
- Unable to parse header because of invalid format.
UnsupportedRangeFormatException
- Header is a valid HTTP range header, the specific
form is not supported by app engine. This includes unit types other than "bytes" and multiple
ranges.public static ByteRange parseContentRange(java.lang.String contentRange)
contentRange
- Content range string as received from header.
RangeFormatException
- Unable to parse header because of invalid format.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object object)
ByteRange
objects are considered equal if they have the same start and end.
equals
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |