|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.qi4j.api.io.Outputs
public class Outputs
Utility methods for creating standard Outputs
Constructor Summary | |
---|---|
Outputs()
|
Method Summary | ||
---|---|---|
static
|
byteBuffer(File file)
Write ByteBuffer data to a file. |
|
static
|
byteBuffer(OutputStream stream)
Write ByteBuffer data to an OutputStream. |
|
static
|
bytes(File file,
int bufferSize)
Write byte array data to a file. |
|
static
|
collection(Collection<T> collection)
Add items to a collection |
|
static
|
noop()
Do nothing. |
|
static Output<Object,RuntimeException> |
systemOut()
Write objects to System.out.println. |
|
static Output<String,IOException> |
text(File file)
Write lines to a text file with UTF-8 encoding. |
|
static Output<String,IOException> |
text(File file,
String encoding)
Write lines to a text file. |
|
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<String,IOException> text(File file)
file
- the file to save the text to
public static Output<String,IOException> text(File file, String encoding)
file
- the file to save the text to
public static <T> Output<ByteBuffer,IOException> byteBuffer(File file)
T
- file
-
public static <T> Output<ByteBuffer,IOException> byteBuffer(OutputStream stream)
T
- stream
-
public static <T> Output<byte[],IOException> bytes(File file, int bufferSize)
T
- file
- bufferSize
-
public static <T> Output<T,RuntimeException> noop()
T
-
public static <T,ReceiverThrowableType extends Throwable> Output<T,ReceiverThrowableType> withReceiver(Receiver<T,ReceiverThrowableType> receiver)
T
- receiver
- receiver for this Output
public static Output<Object,RuntimeException> systemOut()
public static <T> Output<T,RuntimeException> collection(Collection<T> collection)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |