org.apache.http.entity
Class FileEntityHC4
java.lang.Object
org.apache.http.entity.AbstractHttpEntityHC4
org.apache.http.entity.FileEntityHC4
- All Implemented Interfaces:
- java.lang.Cloneable, org.apache.http.HttpEntity
@NotThreadSafe
public class FileEntityHC4
- extends AbstractHttpEntityHC4
- implements java.lang.Cloneable
A self contained, repeatable entity that obtains its content from a file.
- Since:
- 4.0
|
Field Summary |
protected java.io.File |
file
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
file
protected final java.io.File file
FileEntityHC4
@Deprecated
public FileEntityHC4(java.io.File file,
java.lang.String contentType)
- Deprecated. (4.1.3)
FileEntityHC4(File, ContentType)
FileEntityHC4
public FileEntityHC4(java.io.File file,
ContentType contentType)
- Since:
- 4.2
FileEntityHC4
public FileEntityHC4(java.io.File file)
- Since:
- 4.2
isRepeatable
public boolean isRepeatable()
- Specified by:
isRepeatable in interface org.apache.http.HttpEntity
getContentLength
public long getContentLength()
- Specified by:
getContentLength in interface org.apache.http.HttpEntity
getContent
public java.io.InputStream getContent()
throws java.io.IOException
- Specified by:
getContent in interface org.apache.http.HttpEntity
- Throws:
java.io.IOException
writeTo
public void writeTo(java.io.OutputStream outstream)
throws java.io.IOException
- Specified by:
writeTo in interface org.apache.http.HttpEntity
- Throws:
java.io.IOException
isStreaming
public boolean isStreaming()
- Tells that this entity is not streaming.
- Specified by:
isStreaming in interface org.apache.http.HttpEntity
- Returns:
false
clone
public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
- Overrides:
clone in class java.lang.Object
- Throws:
java.lang.CloneNotSupportedException