Class FileContent
- java.lang.Object
-
- net.lenni0451.commons.httpclient.content.HttpContent
-
- net.lenni0451.commons.httpclient.content.impl.FileContent
-
public class FileContent extends HttpContent
-
-
Field Summary
-
Fields inherited from class net.lenni0451.commons.httpclient.content.HttpContent
content
-
-
Constructor Summary
Constructors Constructor Description FileContent(java.io.File file)FileContent(ContentType contentType, java.io.File file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]compute()intgetContentLength()-
Methods inherited from class net.lenni0451.commons.httpclient.content.HttpContent
bytes, bytes, file, form, form, getAsBytes, getAsString, getAsString, getContentType, string, string
-
-
-
-
Constructor Detail
-
FileContent
public FileContent(java.io.File file)
-
FileContent
public FileContent(ContentType contentType, java.io.File file)
-
-
Method Detail
-
getContentLength
public int getContentLength()
- Specified by:
getContentLengthin classHttpContent- Returns:
- The content length
-
compute
@Nonnull protected byte[] compute() throws java.io.IOException- Specified by:
computein classHttpContent- Returns:
- The content
- Throws:
java.io.IOException- If an I/O error occurs
-
-