public abstract class Request extends Object
RosetteAPI class
create request objects. More complex applications may create objects of the subclasses
of this class for themselves via the fluent Builder classes.
content item in the Json object.contentType.contentUri. Note that the Rosette API respects the content type
returned by the server for downloaded data.Object; it contains a String
for plain text, and an InputStream for binary data. Request.Builder
provides several alternative methods for setting this information.| Modifier and Type | Class and Description |
|---|---|
static class |
Request.Builder<T extends Request,O,B extends Request.Builder<T,O,B>>
Base class for builders for the request objects.
|
| Modifier | Constructor and Description |
|---|---|
protected |
Request(com.basistech.util.LanguageCode language,
Object content,
String contentUri,
String contentType)
Constructor for
Request |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
if the param is a
Request, compare contents for equality |
String |
getContent()
get content to process if it's a String.
|
InputStream |
getContentBytes()
get the content as an array of bytes
|
String |
getContentType()
get the content type
|
String |
getContentUri()
get the URI to accessible content (content and contentURI are mutually exlcusive)
|
com.basistech.util.LanguageCode |
getLanguage()
get the language code
|
Object |
getRawContent() |
int |
hashCode() |
public com.basistech.util.LanguageCode getLanguage()
public String getContent()
public InputStream getContentBytes()
public Object getRawContent()
public String getContentUri()
public String getContentType()
Copyright © 2014–2016 Basis Technology Corp.. All rights reserved.