ReReadableRepresentation

public class ReReadableRepresentation extends Representation

Wrapper for Representation. Copies (part of) the content of a transient representation while it is read for later reuse (Needed by RequestLog). If the representation is longer than MAX_LENGTH characters, the copy is truncated.

Author:

tf

Fields

MAX_LENGTH

public static final int MAX_LENGTH

Constructors

ReReadableRepresentation

public ReReadableRepresentation(Representation requestEntity)

Methods

add

public void add(ByteBuffer dst)

add

public void add(CharBuffer target)

add

public void add(byte[] b)

add

public void add(char r)

add

public void add(char[] cbuf)

append

public void append(Appendable appendable)

close

public void close()

closeEarly

public void closeEarly()

createClientInfo

public ClientInfo createClientInfo()

equals

public boolean equals(Object other)

exhaust

public long exhaust()

getAvailableSize

public long getAvailableSize()

getChannel

public ReadableByteChannel getChannel()

getCharacterSet

public CharacterSet getCharacterSet()

getDigest

public Digest getDigest()

getDisposition

public Disposition getDisposition()

getEncodings

public List<Encoding> getEncodings()

getExpirationDate

public Date getExpirationDate()

getLanguages

public List<Language> getLanguages()

getLocationRef

public Reference getLocationRef()

getMediaType

public MediaType getMediaType()

getModificationDate

public Date getModificationDate()

getRange

public Range getRange()

getReader

public Reader getReader()

getRegistration

public SelectionRegistration getRegistration()

getSize

public long getSize()

getStream

public InputStream getStream()

getString

public String getString()

getTag

public Tag getTag()

getText

public String getText()

hasKnownSize

public boolean hasKnownSize()

includes

public boolean includes(Variant other)

isAvailable

public boolean isAvailable()

isCompatible

public boolean isCompatible(Variant other)

isEmpty

public boolean isEmpty()

isSelectable

public boolean isSelectable()

isTransient

public boolean isTransient()

release

public void release()

setAvailable

public void setAvailable(boolean available)

setCharacterSet

public void setCharacterSet(CharacterSet characterSet)

setDigest

public void setDigest(Digest digest)

setDisposition

public void setDisposition(Disposition disposition)

setEncodings

public void setEncodings(List<Encoding> encodings)

setExpirationDate

public void setExpirationDate(Date expirationDate)

setLanguages

public void setLanguages(List<Language> languages)

setListener

public void setListener(ReadingListener readingListener)

setLocationRef

public void setLocationRef(Reference location)

setLocationRef

public void setLocationRef(String locationUri)

setMediaType

public void setMediaType(MediaType mediaType)

setModificationDate

public void setModificationDate(Date modificationDate)

setRange

public void setRange(Range range)

setSize

public void setSize(long expectedSize)

setTag

public void setTag(Tag tag)

setTransient

public void setTransient(boolean isTransient)

toString

public String toString()

write

public void write(Writer writer)

write

public void write(WritableByteChannel writableChannel)

write

public void write(OutputStream outputStream)