|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.vfs.StreamImpl
com.caucho.vfs.HttpStreamWrapper
public class HttpStreamWrapper
Facade to HttpStream to properly handle the close.
| Field Summary |
|---|
| Fields inherited from class com.caucho.vfs.StreamImpl |
|---|
_nullPath, _path |
| Method Summary | |
|---|---|
boolean |
canRead()
The stream is readable. |
boolean |
canWrite()
The stream is always writable (?) |
void |
close()
Close the connection. |
java.lang.Object |
getAttribute(java.lang.String name)
Returns a header from the response returned from the HTTP server. |
java.util.Iterator |
getAttributeNames()
Returns an iterator of the returned header names. |
int |
getAvailable()
Returns the bytes still available. |
java.lang.String |
getHost()
Returns the stream's host. |
int |
getPort()
Returns the stream's port. |
boolean |
isSSL()
Set if this should be an SSL connection. |
int |
read(byte[] buf,
int offset,
int length)
Read data from the connection. |
void |
removeAttribute(java.lang.String name)
Remove a header for the request. |
void |
setAttribute(java.lang.String name,
java.lang.Object value)
Sets a header for the request. |
void |
setHead(boolean isHead)
Sets true if we're only interested in the head. |
void |
setHttp10()
Sets the http version. |
void |
setHttp11()
Sets the http version. |
void |
setMethod(java.lang.String method)
Sets the method |
void |
setSocketTimeout(long timeout)
Sets the timeout. |
void |
setSSL(boolean isSSL)
Set if this should be an SSL connection. |
void |
write(byte[] buf,
int offset,
int length,
boolean isEnd)
Writes a buffer to the underlying stream. |
| Methods inherited from class com.caucho.vfs.StreamImpl |
|---|
clearWrite, closeWrite, flush, flushBuffer, flushToDisk, getFlushOnNewline, getNewline, getPath, getReadBuffer, getReadPosition, hasSkip, isClosed, isEof, readNonBlock, readTimeout, seekEnd, seekStart, setPath, setWriteEncoding, skip, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void setSSL(boolean isSSL)
public boolean isSSL()
public void setMethod(java.lang.String method)
public void setHead(boolean isHead)
public java.lang.String getHost()
public int getPort()
public void setHttp10()
public void setHttp11()
public java.lang.Object getAttribute(java.lang.String name)
throws java.io.IOException
getAttribute in class StreamImplname - name of the header
java.io.IOException
public java.util.Iterator getAttributeNames()
throws java.io.IOException
getAttributeNames in class StreamImpljava.io.IOException
public void setAttribute(java.lang.String name,
java.lang.Object value)
setAttribute in class StreamImplname - the attribute name.value - the attribute value.public void removeAttribute(java.lang.String name)
removeAttribute in class StreamImplname - the attribute name.
public void setSocketTimeout(long timeout)
throws java.net.SocketException
java.net.SocketExceptionpublic boolean canWrite()
canWrite in class StreamImpl
public void write(byte[] buf,
int offset,
int length,
boolean isEnd)
throws java.io.IOException
write in class StreamImplbuffer - the byte array to write.offset - the offset into the byte array.length - the number of bytes to write.isEnd - true when the write is flushing a close.
java.io.IOExceptionpublic boolean canRead()
canRead in class StreamImpl
public int read(byte[] buf,
int offset,
int length)
throws java.io.IOException
read in class StreamImplbuf - byte array receiving the data.offset - starting offset into the array.length - number of bytes to read.
java.io.IOException
public int getAvailable()
throws java.io.IOException
getAvailable in class StreamImpljava.io.IOException
public void close()
throws java.io.IOException
close in class StreamImpljava.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||