|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.io.InputStream
org.fcrepo.client.HttpInputStream
public class HttpInputStream
An InputStream from an HttpMethod. When this InputStream is close()d, the underlying http connection is automatically released.
| Constructor Summary | |
|---|---|
HttpInputStream(org.apache.commons.httpclient.HttpClient client,
org.apache.commons.httpclient.HttpMethod method,
String url)
|
|
| Method Summary | |
|---|---|
int |
available()
|
void |
close()
Release the underlying http connection and close the InputStream. |
void |
finalize()
Automatically close on garbage collection. |
int |
getContentLength()
Get CONTENT-LENGTH in bytes. |
String |
getContentType()
Get CONTENT-TYPE |
String |
getMethodName()
Get the http method name (GET or POST). |
org.apache.commons.httpclient.Header |
getResponseHeader(String name)
Get a header value. |
int |
getStatusCode()
Get the http status code. |
String |
getStatusText()
Get the "reason phrase" associated with the status code. |
String |
getURL()
Get the original URL of the http request this InputStream is based on. |
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 HttpInputStream(org.apache.commons.httpclient.HttpClient client,
org.apache.commons.httpclient.HttpMethod method,
String url)
throws IOException
IOException| Method Detail |
|---|
public String getMethodName()
public String getURL()
public int getStatusCode()
public String getStatusText()
public org.apache.commons.httpclient.Header getResponseHeader(String name)
public String getContentType()
public int getContentLength()
public void finalize()
finalize in class Object
public int read()
throws IOException
read in class InputStreamIOException
public int read(byte[] b)
throws IOException
read in class InputStreamIOException
public int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOException
public long skip(long n)
throws IOException
skip in class InputStreamIOException
public int available()
throws IOException
available in class InputStreamIOExceptionpublic void mark(int readlimit)
mark in class InputStream
public void reset()
throws IOException
reset in class InputStreamIOExceptionpublic boolean markSupported()
markSupported in class InputStream
public void close()
throws IOException
close in interface Closeableclose in class InputStreamIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||