|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.codehaus.httpcache4j.payload.FilePayload
public class FilePayload
Payload that accepts a file with mimetype.
This can be used by the request
| Field Summary | |
|---|---|
protected java.io.File |
file
|
| Constructor Summary | |
|---|---|
FilePayload(java.io.File file,
MIMEType mimeType)
Constructs a File 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.io.File file
| Constructor Detail |
|---|
public FilePayload(java.io.File file,
MIMEType mimeType)
file - the file to use, may not be null.mimeType - the mime type of the file, may not be null.| Method Detail |
|---|
public MIMEType getMimeType()
Payload
getMimeType in interface Payloadpublic java.io.InputStream getInputStream()
Payload
getInputStream in interface Payloadnull if the payload is not available.public boolean isAvailable()
Payloadtrue if the payload is available, IE. If the stream can be read from.
isAvailable in interface Payloadtrue if the payload is available. false if not.public boolean isTransient()
Payload
isTransient in interface Payloadtrue if the payload can be re-read. false if not.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||