|
||||||||||
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 Reader |
getReader(InputStream stream,
CharacterSet characterSet)
Returns a reader from an input stream and a character set. |
static String |
toString(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 String |
toString(InputStream inputStream,
CharacterSet characterSet)
Converts an input stream to a string using the specified character set for decoding the input stream. |
static String |
toString(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 Reader getReader(InputStream stream, CharacterSet characterSet) throws UnsupportedEncodingException
stream
- The input stream.characterSet
- The character set. May be null.
UnsupportedEncodingException
- if a character set is given, but not supportedpublic static String toString(InputStream inputStream)
inputStream
- The input stream.
InputStreamReader
,
toString(InputStream, CharacterSet)
public static String toString(InputStream inputStream, CharacterSet characterSet)
inputStream
- The input stream.characterSet
- The character set
InputStreamReader
public static String toString(Reader reader)
reader
- The characters reader.
InputStreamReader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |