org.restlet.engine.application
Class RangeRepresentation
java.lang.Object
org.restlet.representation.Variant
org.restlet.representation.RepresentationInfo
org.restlet.representation.Representation
org.restlet.util.WrapperRepresentation
org.restlet.engine.application.RangeRepresentation
public class RangeRepresentation
- extends WrapperRepresentation
Representation that exposes only a range of the content of a wrapped
representation.
- Author:
- Jerome Louvel
Methods inherited from class org.restlet.util.WrapperRepresentation |
checkDigest, checkDigest, computeDigest, exhaust, getCharacterSet, getDigest, getDisposition, getDownloadName, getEncodings, getExpirationDate, getIdentifier, getLanguages, getLocationRef, getMediaType, getModificationDate, getSize, getTag, getWrappedRepresentation, isAvailable, isDownloadable, isTransient, release, setAvailable, setCharacterSet, setDigest, setDisposition, setDownloadable, setDownloadName, setEncodings, setExpirationDate, setIdentifier, setIdentifier, setLanguages, setLocationRef, setLocationRef, setMediaType, setModificationDate, setSize, setTag, setTransient |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
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.
getAvailableSize
public long getAvailableSize()
- Overrides:
getAvailableSize
in class WrapperRepresentation
getChannel
public java.nio.channels.ReadableByteChannel getChannel()
throws java.io.IOException
- Overrides:
getChannel
in class WrapperRepresentation
- Throws:
java.io.IOException
getRange
public Range getRange()
- Returns the range specific to this wrapper. The wrapped representation
must not have a range set itself.
- Overrides:
getRange
in class WrapperRepresentation
- Returns:
- The range specific to this wrapper.
getReader
public java.io.Reader getReader()
throws java.io.IOException
- Overrides:
getReader
in class WrapperRepresentation
- Throws:
java.io.IOException
getStream
public java.io.InputStream getStream()
throws java.io.IOException
- Overrides:
getStream
in class WrapperRepresentation
- Throws:
java.io.IOException
getText
public java.lang.String getText()
throws java.io.IOException
- Overrides:
getText
in class WrapperRepresentation
- Throws:
java.io.IOException
setRange
public void setRange(Range range)
- Sets the range specific to this wrapper. This will not affect the wrapped
representation.
- Overrides:
setRange
in class WrapperRepresentation
- Parameters:
range
- The range specific to this wrapper.
write
public void write(java.io.Writer writer)
throws java.io.IOException
- Overrides:
write
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-2012 Noelios Technologies.