public class JsonpRepresentation extends WrapperRepresentation
UNKNOWN_SIZE| Constructor and Description |
|---|
JsonpRepresentation(String callback,
Status status,
Representation wrappedRepresentation)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCallback()
Returns the name of the JavaScript callback method.
|
ReadableByteChannel |
getChannel() |
MediaType |
getMediaType() |
long |
getSize() |
Status |
getStatus()
Returns the actual status code.
|
InputStream |
getStream() |
String |
getText() |
void |
write(OutputStream outputStream)
Writes the callback method wrapper first, including the actual HTTP
status code, then the existing JSON content as a body.
|
void |
write(WritableByteChannel writableChannel) |
void |
write(Writer writer) |
exhaust, getAvailableSize, getCharacterSet, getDigest, getDisposition, getEncodings, getExpirationDate, getLanguages, getLocationRef, getModificationDate, getRange, getReader, getRegistration, getTag, getWrappedRepresentation, isAvailable, isSelectable, isTransient, release, setAvailable, setCharacterSet, setDigest, setDisposition, setEncodings, setExpirationDate, setLanguages, setLocationRef, setLocationRef, setMediaType, setModificationDate, setRange, setSize, setTag, setTransientappend, hasKnownSize, isEmpty, setListenercreateClientInfo, equals, includes, isCompatible, toStringpublic JsonpRepresentation(String callback, Status status, Representation wrappedRepresentation)
callback - The name of the JavaScript callback method.status - The actual status code.wrappedRepresentation - public String getCallback()
public ReadableByteChannel getChannel() throws IOException
getChannel in class WrapperRepresentationIOExceptionpublic MediaType getMediaType()
getMediaType in class WrapperRepresentationpublic long getSize()
getSize in class WrapperRepresentationpublic Status getStatus()
public InputStream getStream() throws IOException
getStream in class WrapperRepresentationIOExceptionpublic String getText() throws IOException
getText in class WrapperRepresentationIOExceptionpublic void write(Writer writer) throws IOException
write in class WrapperRepresentationIOExceptionpublic void write(OutputStream outputStream) throws IOException
write in class WrapperRepresentationIOExceptionpublic void write(WritableByteChannel writableChannel) throws IOException
write in class WrapperRepresentationIOExceptionCopyright © 2005-2014 Restlet.