Package org.restlet.representation
Class ByteArrayRepresentation
- java.lang.Object
 - 
- org.restlet.representation.Variant
 - 
- org.restlet.representation.RepresentationInfo
 - 
- org.restlet.representation.Representation
 - 
- org.restlet.representation.StreamRepresentation
 - 
- org.restlet.representation.InputRepresentation
 - 
- org.restlet.representation.ByteArrayRepresentation
 
 
 
 
 
 
 
- 
public class ByteArrayRepresentation extends InputRepresentation
Representation wrapping a byte array.- Author:
 - Jerome Louvel
 
 
- 
- 
Field Summary
- 
Fields inherited from class org.restlet.representation.Representation
UNKNOWN_SIZE 
 - 
 
- 
Constructor Summary
Constructors Constructor Description ByteArrayRepresentation(byte[] byteArray)Constructor.ByteArrayRepresentation(byte[] byteArray, int offSet, int length)ByteArrayRepresentation(byte[] byteArray, int offSet, int length, MediaType mediaType)ByteArrayRepresentation(byte[] byteArray, int offSet, int length, MediaType mediaType, long expectedSize)ByteArrayRepresentation(byte[] byteArray, MediaType mediaType)Constructor.ByteArrayRepresentation(byte[] byteArray, MediaType mediaType, long expectedSize) 
- 
Method Summary
- 
Methods inherited from class org.restlet.representation.InputRepresentation
getStream, getText, release, setStream, write 
- 
Methods inherited from class org.restlet.representation.StreamRepresentation
getChannel, getReader, write, write 
- 
Methods inherited from class org.restlet.representation.Representation
append, exhaust, getAvailableSize, getDigest, getDisposition, getExpirationDate, getRange, getRegistration, getSize, hasKnownSize, isAvailable, isEmpty, isSelectable, isTransient, setAvailable, setDigest, setDisposition, setExpirationDate, setListener, setRange, setSize, setTransient 
- 
Methods inherited from class org.restlet.representation.RepresentationInfo
getModificationDate, getTag, setModificationDate, setTag 
- 
Methods inherited from class org.restlet.representation.Variant
createClientInfo, equals, getCharacterSet, getEncodings, getLanguages, getLocationRef, getMediaType, hashCode, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
ByteArrayRepresentation
public ByteArrayRepresentation(byte[] byteArray)
Constructor.- Parameters:
 byteArray- The byte array to wrap.
 
- 
ByteArrayRepresentation
public ByteArrayRepresentation(byte[] byteArray, int offSet, int length)- Parameters:
 byteArray- The byte array to wrap.offSet- The offset inside the byte array.length- The length to expose inside the byte array.
 
- 
ByteArrayRepresentation
public ByteArrayRepresentation(byte[] byteArray, int offSet, int length, MediaType mediaType)- Parameters:
 byteArray- The byte array to wrap.offSet- The offset inside the byte array.length- The length to expose inside the byte array.mediaType-
 
- 
ByteArrayRepresentation
public ByteArrayRepresentation(byte[] byteArray, int offSet, int length, MediaType mediaType, long expectedSize)- Parameters:
 byteArray- The byte array to wrap.offSet- The offset inside the byte array.length- The length to expose inside the byte array.mediaType- The media type.expectedSize-
 
- 
ByteArrayRepresentation
public ByteArrayRepresentation(byte[] byteArray, MediaType mediaType)Constructor.- Parameters:
 byteArray- The byte array to wrap.mediaType- The media type.
 
- 
ByteArrayRepresentation
public ByteArrayRepresentation(byte[] byteArray, MediaType mediaType, long expectedSize)- Parameters:
 byteArray- The byte array to wrap.mediaType- The media type.expectedSize-
 
 - 
 
 -