org.codehaus.httpcache4j.payload
Interface Payload

All Known Implementing Classes:
FilePayload, InputStreamPayload

public interface Payload


Method Summary
 java.io.InputStream getInputStream()
          Returns the input stream of the payload.
 MIMEType getMimeType()
          Return the mime-type of the payload.
 boolean isAvailable()
          Returns true if the payload is available, IE.
 boolean isTransient()
          Returns the transientness of the payload.
 

Method Detail

getMimeType

MIMEType getMimeType()
Return the mime-type of the payload.

Returns:
the mime-type

getInputStream

java.io.InputStream getInputStream()
Returns the input stream of the payload. This stream MUST be closed when you are done with it.

Returns:
the inputstream of the payload, may return null if the payload is not available.

isAvailable

boolean isAvailable()
Returns true if the payload is available, IE. If the stream can be read from.

Returns:
true if the payload is available. false if not.

isTransient

boolean isTransient()
Returns the transientness of the payload. I.E if the payload can be re-read.

Returns:
true if the payload can be re-read. false if not.


Copyright © 2008. All Rights Reserved.