org.mmbase.servlet
Class FileServlet.FirstLastRange

Package class diagram package FileServlet.FirstLastRange
java.lang.Object
  extended by org.mmbase.servlet.FileServlet.FirstLastRange
All Implemented Interfaces:
FileServlet.Range
Enclosing class:
FileServlet

protected static class FileServlet.FirstLastRange
extends Object
implements FileServlet.Range

Implementation of Range simply stating the first and last chars which are available, perhaps with a maximum too. This only deals with - entries in the Range specification.

Since:
MMBase-2.0

Constructor Summary
FileServlet.FirstLastRange(long f, long l, long m)
           
FileServlet.FirstLastRange(String parse, long max)
           
 
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 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()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileServlet.FirstLastRange

FileServlet.FirstLastRange(long f,
                           long l,
                           long m)

FileServlet.FirstLastRange

FileServlet.FirstLastRange(String parse,
                           long max)
Method Detail

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.

toString

public String toString()
Overrides:
toString in class Object


MMBase2 Resources 2.0-SNAPSHOT - 2013-11-29T11:09