to.etc.domui.util.upload
Class FencedOutputStream
java.lang.Object
java.io.OutputStream
to.etc.domui.util.upload.FencedOutputStream
- All Implemented Interfaces:
- java.io.Closeable, java.io.Flushable
public class FencedOutputStream
- extends java.io.OutputStream
Method Summary |
void |
close()
|
byte[] |
getBuffer()
|
java.io.File |
getFile()
|
boolean |
isMemory()
Return T if the whole thing is in memory. |
int |
size()
Returns the size, in bytes, of the written thing. |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
Methods inherited from class java.io.OutputStream |
flush |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FencedOutputStream
public FencedOutputStream(java.io.File repos,
int fence)
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Overrides:
close
in class java.io.OutputStream
- Throws:
java.io.IOException
write
public void write(int b)
throws java.io.IOException
- Specified by:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
write
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
write
public void write(byte[] b)
throws java.io.IOException
- Overrides:
write
in class java.io.OutputStream
- Throws:
java.io.IOException
isMemory
public final boolean isMemory()
- Return T if the whole thing is in memory.
- Returns:
getBuffer
public final byte[] getBuffer()
size
public final int size()
- Returns the size, in bytes, of the written thing.
- Returns:
getFile
public final java.io.File getFile()