org.mmbase.servlet
Class FileServlet.ChainedRange
java.lang.Object
org.mmbase.servlet.FileServlet.ChainedRange
- All Implemented Interfaces:
- FileServlet.Range
- Enclosing class:
- FileServlet
protected static class FileServlet.ChainedRange
- extends Object
- implements FileServlet.Range
This implementation of Range parses and combines a number of FileServlet.FirstLastRanges.
So, this deals with the entire Range specification then.
- Since:
- MMBase-2.0
|
Method Summary |
long |
available(long i)
If we are at byte number i, how many are available from here until we encounter one which isn't? |
long |
getLength()
|
long |
notavailable(long i)
If we are at byte number i, how many are not available from here until we encounter one which is? |
String |
toString()
|
ranges
final List<FileServlet.Range> ranges
max
final long max
FileServlet.ChainedRange
FileServlet.ChainedRange(String s,
long max)
available
public long available(long i)
- Description copied from interface:
FileServlet.Range
- If we are at byte number i, how many are available from here until we encounter one which isn't?
- Specified by:
available in interface FileServlet.Range
- Returns:
- A number of bytes which are available,
0 if there are not bytes available. A large number near Long.MAX_VALUE if there is no limit any more.
notavailable
public long notavailable(long i)
- Description copied from interface:
FileServlet.Range
- If we are at byte number i, how many are not available from here until we encounter one which is?
- Specified by:
notavailable in interface FileServlet.Range
- Returns:
- Some number of bytes or
0 if the next character is available. A large number near Long.MAX_VALUE if all subsequent byes are unavailable.
getLength
public long getLength()
toString
public String toString()
- Overrides:
toString in class Object
MMBase2 Resources 2.0-SNAPSHOT - 2013-05-29T22:09