com.caucho.vfs
Class VfsStream
java.lang.Object
|
+--com.caucho.vfs.StreamImpl
|
+--com.caucho.vfs.VfsStream
- public class VfsStream
- extends StreamImpl
Stream encapsulating InputStream/OutputStream.
Constructor Summary |
VfsStream(java.io.InputStream is,
java.io.OutputStream os)
Create a new VfsStream based on the java.io.* stream. |
VfsStream(java.io.InputStream is,
java.io.OutputStream os,
Path path)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VfsStream
public VfsStream(java.io.InputStream is,
java.io.OutputStream os)
- Create a new VfsStream based on the java.io.* stream.
VfsStream
public VfsStream(java.io.InputStream is,
java.io.OutputStream os,
Path path)
init
public void init(java.io.InputStream is,
java.io.OutputStream os)
setNewline
public void setNewline(byte[] newline)
getNewline
public byte[] getNewline()
- Overrides:
getNewline
in class StreamImpl
openReadWrite
public static ReadWritePair openReadWrite(java.io.InputStream is,
java.io.OutputStream os)
openRead
public static ReadStream openRead(java.io.InputStream is)
openRead
public static ReadStream openRead(java.io.InputStream is,
WriteStream ws)
openWrite
public static WriteStream openWrite(java.io.OutputStream os)
canRead
public boolean canRead()
- Overrides:
canRead
in class StreamImpl
read
public int read(byte[] buf,
int offset,
int length)
throws java.io.IOException
- Overrides:
read
in class StreamImpl
getAvailable
public int getAvailable()
throws java.io.IOException
- Overrides:
getAvailable
in class StreamImpl
getReadPosition
public long getReadPosition()
- Overrides:
getReadPosition
in class StreamImpl
canWrite
public boolean canWrite()
- Overrides:
canWrite
in class StreamImpl
getFlushOnNewline
public boolean getFlushOnNewline()
- Overrides:
getFlushOnNewline
in class StreamImpl
setFlushOnNewline
public void setFlushOnNewline(boolean value)
write
public void write(byte[] buf,
int offset,
int length,
boolean isEnd)
throws java.io.IOException
- Overrides:
write
in class StreamImpl
flush
public void flush()
throws java.io.IOException
- Overrides:
flush
in class StreamImpl
setCloseChildOnClose
public void setCloseChildOnClose(boolean close)
close
public void close()
throws java.io.IOException
- Overrides:
close
in class StreamImpl