Package com.jalios.rest.client.multipart
Class HttpClientFormMultipartRepresentation
- java.lang.Object
-
- org.restlet.resource.Variant
-
- org.restlet.resource.Representation
-
- com.jalios.rest.client.multipart.HttpClientFormMultipartRepresentation
-
public class HttpClientFormMultipartRepresentation extends org.restlet.resource.RepresentationRestlet Representation for a Form Multipart request. Based on HttpClient MultipartRequestEntity (it is a wrapper).- Since:
- JCMS-6.1
- Author:
- dissert
-
-
Constructor Summary
Constructors Constructor Description HttpClientFormMultipartRepresentation(java.util.List<MultipartParameter> multipartContent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.nio.channels.ReadableByteChannelgetChannel()longgetSize()java.io.InputStreamgetStream()java.lang.StringgetText()Converts the representation to a string value.voidwrite(java.io.OutputStream outputStream)Writes the representation to a byte stream.voidwrite(java.nio.channels.WritableByteChannel writableChannel)-
Methods inherited from class org.restlet.resource.Representation
isAvailable, isTransient, setAvailable, setTransient
-
-
-
-
Constructor Detail
-
HttpClientFormMultipartRepresentation
public HttpClientFormMultipartRepresentation(java.util.List<MultipartParameter> multipartContent)
-
-
Method Detail
-
getSize
public long getSize()
- Overrides:
getSizein classorg.restlet.resource.Variant- Returns:
- The size in bytes.
-
getStream
public java.io.InputStream getStream() throws java.io.IOException- Specified by:
getStreamin classorg.restlet.resource.Representation- Throws:
java.io.IOException
-
getText
public java.lang.String getText() throws java.io.IOExceptionConverts the representation to a string value. Be careful when using this method as the conversion of large content to a string fully stored in memory can result in OutOfMemoryErrors being thrown.- Overrides:
getTextin classorg.restlet.resource.Representation- Returns:
- The representation as a string value.
- Throws:
java.io.IOException
-
write
public void write(java.io.OutputStream outputStream) throws java.io.IOExceptionWrites the representation to a byte stream.- Specified by:
writein classorg.restlet.resource.Representation- Parameters:
outputStream- The output stream.- Throws:
java.io.IOException
-
getChannel
public java.nio.channels.ReadableByteChannel getChannel() throws java.io.IOException- Specified by:
getChannelin classorg.restlet.resource.Representation- Throws:
java.io.IOException
-
write
public void write(java.nio.channels.WritableByteChannel writableChannel) throws java.io.IOException- Specified by:
writein classorg.restlet.resource.Representation- Throws:
java.io.IOException
-
-