|
||||||||||
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 FormConstructor Summary | |
---|---|
FileResourceStream(File file)
Constructor. |
|
FileResourceStream(File file)
Constructor. |
Method Summary | |
---|---|
void |
close()
Closes this resource. |
String |
getContentType()
Gets the mime type of this resource |
File |
getFile()
|
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 |
String |
locationAsString()
|
String |
toString()
|
Methods inherited from class org.apache.wicket.util.resource.AbstractResourceStream |
---|
asString, getCharset, getLocale, setCharset, setLocale |
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(File file)
file
- File
containing resourceMethod Detail |
---|
public void close() throws IOException
close
in interface Closeable
close
in interface IResourceStream
IOException
public String getContentType()
IResourceStream
getContentType
in interface IResourceStream
getContentType
in class AbstractResourceStream
ResourceStreamRequestTarget
handle the Content-Type automaticallyIResourceStream.getContentType()
public File getFile()
public InputStream getInputStream() throws ResourceStreamNotFoundException
IResourceStream
getInputStream
in interface IResourceStream
ResourceStreamNotFoundException
IResourceStream.close()
public Time lastModifiedTime()
IModifiable
lastModifiedTime
in interface IModifiable
lastModifiedTime
in class AbstractResourceStream
IModifiable.lastModifiedTime()
public String toString()
toString
in class Object
Object.toString()
public long length()
IResourceStream
length
in interface IResourceStream
length
in class AbstractResourceStream
IResourceStream.length()
public String locationAsString()
locationAsString
in interface IFixedLocationResourceStream
IFixedLocationResourceStream.locationAsString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |