|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.io.InputStream org.norther.tammi.acorn.net.URLInputStream
public class URLInputStream
An input stream reading from a specific URL.
The stream can be closed automatically at EOF with the first stream closing option. However, the mark and reset operations won't work for a stream that is closed after reaching its EOF.
Constructor Summary | |
---|---|
URLInputStream(URL url,
boolean... options)
Constructs a new URL input stream. |
|
URLInputStream(URL url,
String enc,
boolean... options)
Constructs a new URL input stream with an encoding check. |
Method Summary | |
---|---|
int |
available()
|
void |
close()
|
protected void |
finalize()
|
String |
getEncoding()
Gets the Unicode encoding of this stream. |
void |
mark(int readlimit)
|
boolean |
markSupported()
|
int |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int off,
int len)
|
void |
reset()
|
long |
skip(long n)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public URLInputStream(URL url, boolean... options) throws IOException
url
- the URL of the stream.options
- the closing options.
IOException
- on I/O errors.public URLInputStream(URL url, String enc, boolean... options) throws IOException
url
- the URL of the stream.enc
- an optional default encoding.options
- the closing options.
IOException
- on I/O errors.Method Detail |
---|
public int available() throws IOException
available
in class InputStream
IOException
public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] b) throws IOException
read
in class InputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
public void mark(int readlimit)
mark
in class InputStream
public boolean markSupported()
markSupported
in class InputStream
public void reset() throws IOException
reset
in class InputStream
IOException
public long skip(long n) throws IOException
skip
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in class InputStream
IOException
public String getEncoding() throws IOException
IOException
- on I/O errors.protected void finalize()
finalize
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |