|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.foxsmart.ic.io.SimpleStreamReader
public class SimpleStreamReader
This class provides the ability to read the entire contents of a stream into a returned byte array. For more granular control of streams with a known size, use StreamReader.
| Constructor Summary | |
|---|---|
SimpleStreamReader(java.io.File file)
Constructs a stream reader from a File. |
|
SimpleStreamReader(java.io.InputStream inputStream)
Constructs a stream reader from an Input Stream. |
|
SimpleStreamReader(java.net.URL url)
Constructs a stream reader from a URL. |
|
| Method Summary | |
|---|---|
byte[] |
read()
Read all bytes from the input stream and return them in a byte array. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleStreamReader(java.net.URL url)
throws java.io.IOException
url - The URL to create the stream from
java.io.IOException - if the URL stream could not be opened to the URL
java.net.UnknownServiceException - if the URL protocol does not support input
public SimpleStreamReader(java.io.File file)
throws java.io.IOException
file - The file to create the stream from
java.net.MalformedURLException - if the path cannot be parsed as a URL.
java.io.IOException - if the URL stream could not be opened to the URL
java.net.UnknownServiceException - if the URL protocol does not support inputpublic SimpleStreamReader(java.io.InputStream inputStream)
inputStream - The Input Stream to read from.| Method Detail |
|---|
public byte[] read()
throws java.io.IOException
java.io.IOException - if the stream could not be read or an error occurred while reading from the stream.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||