public class OutputAppender extends OutputStream implements Iterable<OutputAppender>
Constructor and Description |
---|
OutputAppender(OutputStream out) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
static OutputAppender |
create(OutputStream logStream)
创建
|
void |
flush() |
OutputStream |
getOut() |
OutputAppender |
getRoot()
获取根节点
|
void |
handle(Consumer<OutputStream> c)
处理流
|
Iterator<OutputAppender> |
iterator() |
OutputAppender |
onClose(boolean onClose)
close时是否关闭流
|
OutputAppender |
then(OutputStream logStream)
连接下一个
|
void |
write(byte[] bs) |
void |
write(byte[] bs,
int off,
int len) |
void |
write(int b) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
forEach, spliterator
public OutputAppender(OutputStream out)
public static OutputAppender create(OutputStream logStream)
logStream
- logStreampublic OutputAppender then(OutputStream logStream)
logStream
- logStreampublic OutputAppender onClose(boolean onClose)
onClose
- onClosepublic OutputAppender getRoot()
public void handle(Consumer<OutputStream> c)
c
- cpublic void write(int b) throws IOException
write
in class OutputStream
IOException
public void write(byte[] bs) throws IOException
write
in class OutputStream
IOException
public void write(byte[] bs, int off, int len) throws IOException
write
in class OutputStream
IOException
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in class OutputStream
public void flush()
flush
in interface Flushable
flush
in class OutputStream
public Iterator<OutputAppender> iterator()
iterator
in interface Iterable<OutputAppender>
public OutputStream getOut()
Copyright © 2024. All rights reserved.