|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.qi4j.io.Outputs
public class Outputs
Utility methods for creating standard Outputs
Constructor Summary | |
---|---|
Outputs()
|
Method Summary | ||
---|---|---|
static
|
byteBuffer(java.io.File file)
Write ByteBuffer data to a file. |
|
static
|
byteBuffer(java.io.OutputStream stream)
Write ByteBuffer data to an OutputStream. |
|
static
|
bytes(java.io.File file,
int bufferSize)
Write byte array data to a file. |
|
static
|
collection(java.util.Collection<T> collection)
Add items to a collection |
|
static
|
noop()
Do nothing. |
|
static Output<java.lang.Object,java.lang.RuntimeException> |
systemErr()
Write objects to System.err.println. |
|
static Output<java.lang.Object,java.lang.RuntimeException> |
systemOut()
Write objects to System.out.println. |
|
static Output<java.lang.String,java.io.IOException> |
text(java.io.File file)
Write lines to a text file with UTF-8 encoding. |
|
static Output<java.lang.String,java.io.IOException> |
text(java.io.File file,
java.lang.String encoding)
Write lines to a text file. |
|
static Output<java.lang.String,java.io.IOException> |
text(java.lang.StringBuilder builder)
Write lines to a StringBuilder. |
|
static Output<java.lang.String,java.io.IOException> |
text(java.io.Writer writer)
Write lines to a Writer. |
|
static
|
withReceiver(Receiver<T,ReceiverThrowableType> receiver)
Use given receiver as Output. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Outputs()
Method Detail |
---|
public static Output<java.lang.String,java.io.IOException> text(java.io.File file)
file
- the file to save the text to
public static Output<java.lang.String,java.io.IOException> text(java.io.File file, java.lang.String encoding)
file
- the file to save the text to
public static Output<java.lang.String,java.io.IOException> text(java.io.Writer writer)
writer
- the Writer to write the text to
public static Output<java.lang.String,java.io.IOException> text(java.lang.StringBuilder builder)
builder
- the StringBuilder to append the text to
public static <T> Output<java.nio.ByteBuffer,java.io.IOException> byteBuffer(java.io.File file)
T
- file
-
public static <T> Output<java.nio.ByteBuffer,java.io.IOException> byteBuffer(java.io.OutputStream stream)
T
- stream
-
public static <T> Output<byte[],java.io.IOException> bytes(java.io.File file, int bufferSize)
T
- file
- bufferSize
-
public static <T> Output<T,java.lang.RuntimeException> noop()
T
-
public static <T,ReceiverThrowableType extends java.lang.Throwable> Output<T,ReceiverThrowableType> withReceiver(Receiver<T,ReceiverThrowableType> receiver)
T
- receiver
- receiver for this Output
public static Output<java.lang.Object,java.lang.RuntimeException> systemOut()
public static Output<java.lang.Object,java.lang.RuntimeException> systemErr()
public static <T> Output<T,java.lang.RuntimeException> collection(java.util.Collection<T> collection)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |