org.restlet.representation
Class ByteArrayRepresentation

java.lang.Object
  extended by org.restlet.representation.Variant
      extended by org.restlet.representation.RepresentationInfo
          extended by org.restlet.representation.Representation
              extended by org.restlet.representation.StreamRepresentation
                  extended by org.restlet.representation.InputRepresentation
                      extended by 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
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, includes, isCompatible, setCharacterSet, setEncodings, setLanguages, setLocationRef, setLocationRef, setMediaType, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 -


Copyright © 2005-2013 Restlet.