|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
com.infoengine.SAK.HttpInputStream
This class implements an HTTP input stream class for Info*Engine.
Field Summary | |
private int |
contentLength
|
private byte[] |
inputBuffer
|
private int |
inputBufferCursor
|
private int |
inputBufferLimit
|
private InputStream |
inputStream
|
Fields inherited from class java.io.InputStream |
|
Constructor Summary | |
HttpInputStream()
|
|
HttpInputStream(URLConnection connection)
Constructor that initializes the instance to read from a URL connection. |
Method Summary | |
int |
available()
Return the number of bytes that can be read without blocking. |
void |
close()
Close the input stream. |
InputStream |
getInputStream()
|
void |
mark(int readLimit)
Mark the current position in the input stream. |
boolean |
markSupported()
Return an indication of support for input stream marking. |
int |
read()
Return a byte from the input stream. |
int |
read(byte[] b)
Read bytes from the input stream into an array. |
int |
read(byte[] b,
int off,
int len)
Read bytes from the input stream into an array or subarray. |
String |
readLine()
Read a line of text from the client connection using the default character encoding for the platform. |
String |
readLine(String encoding)
Read a line of text from the client connection using a specified character encoding. |
void |
reset()
Reset input stream position to last mark. |
void |
setContentLength(int contentLength)
|
void |
setInputStream(InputStream in)
|
long |
skip(long n)
Read and discard bytes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private int contentLength
private byte[] inputBuffer
private int inputBufferCursor
private int inputBufferLimit
private InputStream inputStream
Constructor Detail |
public HttpInputStream()
public HttpInputStream(URLConnection connection) throws IOException
Method Detail |
public int available() throws IOException
IOException
public void close() throws IOException
IOException
public void mark(int readLimit)
readLimit
- position to markpublic boolean markSupported()
public int read() throws IOException
IOException
public int read(byte[] b) throws IOException
b
- array
IOException
public int read(byte[] b, int off, int len) throws IOException
b
- arrayoff
- offset of array at which to read byteslen
- maximum number of bytes to read
IOException
public String readLine() throws IOException
IOException
public String readLine(String encoding) throws IOException
encoding
- the character encoding to apply to the connection
IOException
public void reset() throws IOException
IOException
public long skip(long n) throws IOException
n
- number of bytes to read and discard
IOException
public void setInputStream(InputStream in)
public void setContentLength(int contentLength)
public InputStream getInputStream()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |