| Modifier and Type | Field and Description |
|---|---|
| protected final File |
| Access | Constructor and Description |
|---|---|
| public | FileEntity(final File
The file to serve. file, final String The content type for the given contentType)file.
Deprecated
(4.1.3)
Creates a new instance.
FileEntity(File, ContentType)
|
| public | FileEntity(final File
The file to serve. file, final ContentType The content type for the given contentType)file.Creates a new instance. |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Object | |
| public InputStream | getContent()
Implements org. |
| public long | getContentLength()
Implements org. |
| public boolean | isRepeatable()
Implements org. |
| public boolean | Returns: falseImplements org. |
| public void | writeTo(final OutputStream
the output stream to write entity content to outStream)Implements org. |
| file | back to summary |
|---|---|
| protected final File file | |
| FileEntity | back to summary |
|---|---|
| public FileEntity(final File file, final String contentType)
Deprecated (4.1.3) Creates a new instance.
| |
| FileEntity | back to summary |
|---|---|
| public FileEntity(final File file, final ContentType contentType) Creates a new instance.
| |
| FileEntity | back to summary |
|---|---|
| public FileEntity(final File file) Creates a new instance.
| |
| clone | back to summary |
|---|---|
| public Object clone() throws CloneNotSupportedException Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| getContent | back to summary |
|---|---|
| public InputStream getContent() throws IOException Implements org. Doc from org. Returns a content stream of the entity.
Important Note Please note all entity implementations must ensure that
all allocated resources are properly deallocated after
the
| |
| getContentLength | back to summary |
|---|---|
| public long getContentLength() Implements org. Doc from org. Tells the length of the content, if known.
| |
| isRepeatable | back to summary |
|---|---|
| public boolean isRepeatable() Implements org. Doc from org. Tells if the entity is capable of producing its data more than once. A repeatable entity's getContent() and writeTo(OutputStream) methods can be called more than once whereas a non-repeatable entity's can not.
| |
| isStreaming | back to summary |
|---|---|
| public boolean isStreaming() Implements org. Tells that this entity is not streaming.
| |
| writeTo | back to summary |
|---|---|
| public void writeTo(final OutputStream outStream) throws IOException Implements org. Doc from org. Writes the entity content out to the output stream. Important Note Please note all entity implementations must ensure that all allocated resources are properly deallocated when this method returns.
| |