Class ByteArrayContent
- java.lang.Object
-
- net.lenni0451.commons.httpclient.content.HttpContent
-
- net.lenni0451.commons.httpclient.content.impl.ByteArrayContent
-
- Direct Known Subclasses:
StringContent
public class ByteArrayContent extends HttpContent
-
-
Constructor Summary
Constructors Constructor Description ByteArrayContent(byte[] content)ByteArrayContent(byte[] content, int start, int length)ByteArrayContent(ContentType contentType, byte[] content)ByteArrayContent(ContentType contentType, byte[] content, int start, int length)
-
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
-
ByteArrayContent
public ByteArrayContent(byte[] content)
-
ByteArrayContent
public ByteArrayContent(byte[] content, int start, int length)
-
ByteArrayContent
public ByteArrayContent(ContentType contentType, byte[] content)
-
ByteArrayContent
public ByteArrayContent(ContentType contentType, byte[] content, int start, int length)
-
-
Method Detail
-
getContentLength
public int getContentLength()
- Specified by:
getContentLengthin classHttpContent- Returns:
- The content length
-
compute
@Nonnull protected byte[] compute()
- Specified by:
computein classHttpContent- Returns:
- The content
-
-