net.jxta.search.util
Class MemoryStream
java.lang.Object
|
+--java.io.OutputStream
|
+--net.jxta.search.util.MemoryStream
- public class MemoryStream
- extends java.io.OutputStream
Method Summary |
void |
close()
|
void |
finalize()
|
void |
flush()
|
java.io.InputStream |
getInputStream()
|
int |
getLength()
|
static void |
main(java.lang.String[] argv)
How to test:
Supply data on stdin that would be copied used testWrite
and supply a filename of the file that would be copied
several times to using testArrayWrite, once for each of
the test buffer sizes. |
void |
write(byte[] buf)
|
void |
write(byte[] buf,
int offset,
int length)
|
void |
write(int b)
|
void |
writeToStream(java.io.OutputStream out)
|
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MemoryStream
public MemoryStream()
writeToStream
public void writeToStream(java.io.OutputStream out)
throws java.io.IOException
getInputStream
public java.io.InputStream getInputStream()
write
public void write(int b)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
write
public void write(byte[] buf)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
write
public void write(byte[] buf,
int offset,
int length)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
flush
public void flush()
throws java.io.IOException
- Overrides:
flush
in class java.io.OutputStream
close
public void close()
throws java.io.IOException
- Overrides:
close
in class java.io.OutputStream
getLength
public int getLength()
finalize
public void finalize()
- Overrides:
finalize
in class java.lang.Object
main
public static void main(java.lang.String[] argv)
throws java.io.IOException
- How to test:
Supply data on stdin that would be copied used testWrite
and supply a filename of the file that would be copied
several times to using testArrayWrite, once for each of
the test buffer sizes.
Redirect the output to a file that will contain all of
data supplied on stdin, plus the data from the file,
repeated once for each of the test buffer sizes.