|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.hippoecm.hst.servlet.utils.BinaryPage
public class BinaryPage
A Serializable
representation of a resource from the repository as a html page.
The binary page uses the absolute resource path as identifier. The binary data
is optionally stored in a byte array. When done so the binary must be able to fit in memory.
Constructor Summary | |
---|---|
BinaryPage(String resourcePath)
Create a new binary page. |
Method Summary | |
---|---|
boolean |
containsData()
Check if the BinaryPage also contains the data next to the meta data. |
boolean |
equals(Object obj)
|
long |
getCreationTime()
Get the time the binary page cache object was create in milliseconds since epoch. |
String |
getETag()
Get the ETag |
String |
getFileName()
Get the unencoded file name to be used for Content-Disposition header |
long |
getLastModified()
Get the last modified date in milliseconds since epoch. |
long |
getLength()
Get the data length which can be used for the Content-Length header or cache checks. |
String |
getMimeType()
Get the mime type for the resource. |
long |
getNextValidityCheckTimeStamp()
Get the next Validity Check TimeStamp (millis since epoch) |
String |
getResourcePath()
Get the absolute path of the repository. |
int |
getStatus()
Get the HTTP status for the resource. |
InputStream |
getStream()
Get the InputStream to the byte buffer of the data. |
int |
hashCode()
|
void |
loadDataFromStream(InputStream input)
Read the data from the input stream and close the stream when done. |
void |
setFileName(String fileName)
Set the (un-encoded) file name for the Content-Disposition header. |
void |
setLastModified(long lastModified)
Set the last modification time in milliseconds since epoch. |
void |
setLength(long length)
Set the size of the binary data. |
void |
setMimeType(String mimeType)
Set the mime type. |
void |
setNextValidityCheckTime(long nextValidityCheckTimeStamp)
Set the next validity check timestamp since epoch. |
void |
setStatus(int status)
Set the HTTP status. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BinaryPage(String resourcePath)
resourcePath
- the absolute path of the resource in the repository.Method Detail |
---|
public String getResourcePath()
public int getStatus()
public String getMimeType()
public String getFileName()
public String getETag()
public long getLastModified()
public long getCreationTime()
public long getNextValidityCheckTimeStamp()
public long getLength()
public boolean containsData()
public InputStream getStream()
InputStream
to the byte buffer of the data.
public void loadDataFromStream(InputStream input) throws IOException
input
- the input stream to read the data from.
IOException
- when an error occurs while copying. The stream will be closed.public void setStatus(int status)
status
- public void setMimeType(String mimeType)
mimeType
- public void setFileName(String fileName)
mimeType
- public void setNextValidityCheckTime(long nextValidityCheckTimeStamp)
nextValidityCheckTimeStamp
- public void setLastModified(long lastModified)
lastModified
- public void setLength(long length)
length
- the length of the data.public String toString()
toString
in class Object
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |