com.noelios.restlet.application
Class RangeRepresentation

java.lang.Object
  extended by org.restlet.resource.Variant
      extended by org.restlet.resource.Representation
          extended by org.restlet.util.WrapperRepresentation
              extended by com.noelios.restlet.application.RangeRepresentation

public class RangeRepresentation
extends WrapperRepresentation

Representation that exposes only a range of the content of a wrapped representation.

Author:
Jerome Louvel

Field Summary
 
Fields inherited from class org.restlet.resource.Representation
UNKNOWN_SIZE
 
Constructor Summary
RangeRepresentation(Representation wrappedRepresentation)
          Constructor.
RangeRepresentation(Representation wrappedRepresentation, Range range)
          Constructor.
 
Method Summary
 java.io.InputStream getStream()
           
 void write(java.io.OutputStream outputStream)
           
 void write(java.nio.channels.WritableByteChannel writableChannel)
           
 
Methods inherited from class org.restlet.util.WrapperRepresentation
checkDigest, checkDigest, computeDigest, exhaust, getAvailableSize, getChannel, getCharacterSet, getDigest, getDownloadName, getEncodings, getExpirationDate, getIdentifier, getLanguages, getMediaType, getModificationDate, getRange, getReader, getSize, getTag, getText, getWrappedRepresentation, isAvailable, isDownloadable, isTransient, release, setAvailable, setCharacterSet, setDigest, setDownloadable, setDownloadName, setEncodings, setExpirationDate, setIdentifier, setIdentifier, setLanguages, setMediaType, setModificationDate, setRange, setSize, setTag, setTransient, write
 
Methods inherited from class org.restlet.resource.Representation
createEmpty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RangeRepresentation

public RangeRepresentation(Representation wrappedRepresentation)
Constructor.

Parameters:
wrappedRepresentation - The wrapped representation with a complete content.

RangeRepresentation

public RangeRepresentation(Representation wrappedRepresentation,
                           Range range)
Constructor.

Parameters:
wrappedRepresentation - The wrapped representation with a complete content.
range - The range to expose.
Method Detail

getStream

public java.io.InputStream getStream()
                              throws java.io.IOException
Overrides:
getStream in class WrapperRepresentation
Throws:
java.io.IOException

write

public void write(java.io.OutputStream outputStream)
           throws java.io.IOException
Overrides:
write in class WrapperRepresentation
Throws:
java.io.IOException

write

public void write(java.nio.channels.WritableByteChannel writableChannel)
           throws java.io.IOException
Overrides:
write in class WrapperRepresentation
Throws:
java.io.IOException


Copyright © 2005-2008 Noelios Technologies.