|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.restlet.client.engine.io.BioUtils
public final class BioUtils
Basic IO manipulation utilities.
Method Summary | |
---|---|
static long |
getAvailableSize(Representation representation)
Returns the size effectively available. |
static java.io.Reader |
getReader(java.io.InputStream stream,
CharacterSet characterSet)
Returns a reader from an input stream and a character set. |
static java.lang.String |
toString(java.io.InputStream inputStream)
Converts an input stream to a string. As this method uses the InputstreamReader class, the default character set is used for decoding the input stream. |
static java.lang.String |
toString(java.io.InputStream inputStream,
CharacterSet characterSet)
Converts an input stream to a string using the specified character set for decoding the input stream. |
static java.lang.String |
toString(java.io.Reader reader)
Converts a reader to a string. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static long getAvailableSize(Representation representation)
Representation.getSize()
if no range is defined, otherwise it
returns the size of the range using Range.getSize()
.
representation
- The representation to evaluate.
public static java.io.Reader getReader(java.io.InputStream stream, CharacterSet characterSet) throws java.io.UnsupportedEncodingException
stream
- The input stream.characterSet
- The character set. May be null.
java.io.UnsupportedEncodingException
- if a character set is given, but not supportedpublic static java.lang.String toString(java.io.InputStream inputStream)
inputStream
- The input stream.
toString(InputStream, CharacterSet)
public static java.lang.String toString(java.io.InputStream inputStream, CharacterSet characterSet)
inputStream
- The input stream.characterSet
- The character set
public static java.lang.String toString(java.io.Reader reader)
reader
- The characters reader.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |