Package org.atmosphere.cpr
Class AtmosphereRequestImpl.Body
java.lang.Object
org.atmosphere.cpr.AtmosphereRequestImpl.Body
- Enclosing class:
AtmosphereRequestImpl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]asBytes()Return the request body as a byte array.asString()Return the request body as a String.intTheasBytes()lengthintTheasBytes()offsetbooleanhasBytes()True is the body is a byte arraybooleanTrue is the body is a StringbooleanisEmpty()True if this object is empty
-
Constructor Details
-
Body
-
-
Method Details
-
hasString
public boolean hasString()True is the body is a String- Returns:
- True is the body is a String
-
hasBytes
public boolean hasBytes()True is the body is a byte array- Returns:
- True is the body is a byte array
-
asString
Return the request body as a String. If the body was a byte array, this method will return null.- Returns:
- the request body as a String. If the body was a byte array, this method will return null.
-
asBytes
public byte[] asBytes()Return the request body as a byte array. If the body was String, this method will return null.- Returns:
- the request body as a byte array. If the body was String, this method will return null.
-
byteOffset
public int byteOffset()TheasBytes()offset- Returns:
- The
asBytes()offset
-
byteLength
public int byteLength()TheasBytes()length- Returns:
- The
asBytes()length
-
isEmpty
public boolean isEmpty()True if this object is empty- Returns:
- True if this object is empty
-