|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.util.resource.AbstractResourceStream
org.apache.wicket.util.resource.FileResourceStream
public class FileResourceStream
A FileResourceStream is an IResource implementation for files.
IResourceStream,
IModifiable,
Serialized Form| Constructor Summary | |
|---|---|
FileResourceStream(File file)
Constructor. |
|
FileResourceStream(java.io.File file)
Constructor. |
|
| Method Summary | |
|---|---|
void |
close()
Closes this resource. |
java.lang.String |
getContentType()
Gets the mime type of this resource |
File |
getFile()
|
java.io.InputStream |
getInputStream()
Gets the resource stream. |
Time |
lastModifiedTime()
Gets the last time this modifiable thing changed. |
long |
length()
Gets the size of this resource in bytes TODO 1.5: rename to lengthInBytes() or let it return some sort of size object |
java.lang.String |
locationAsString()
|
java.lang.String |
toString()
|
| Methods inherited from class org.apache.wicket.util.resource.AbstractResourceStream |
|---|
asString, getCharset, getLocale, getStyle, getVariation, setCharset, setLocale, setStyle, setVariation |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FileResourceStream(File file)
file - File containing resourcepublic FileResourceStream(java.io.File file)
file - File containing resource| Method Detail |
|---|
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface IResourceStreamjava.io.IOExceptionpublic java.lang.String getContentType()
IResourceStream
getContentType in interface IResourceStreamgetContentType in class AbstractResourceStreamResourceStreamRequestHandler handle the Content-Type automaticallyIResourceStream.getContentType()public File getFile()
public java.io.InputStream getInputStream()
throws ResourceStreamNotFoundException
IResourceStream
getInputStream in interface IResourceStreamResourceStreamNotFoundExceptionIResourceStream.close()public Time lastModifiedTime()
IModifiable
lastModifiedTime in interface IModifiablelastModifiedTime in class AbstractResourceStreamIModifiable.lastModifiedTime()public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public long length()
IResourceStream
length in interface IResourceStreamlength in class AbstractResourceStreamIResourceStream.length()public java.lang.String locationAsString()
locationAsString in interface IFixedLocationResourceStreamIFixedLocationResourceStream.locationAsString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||