|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.qi4j.io.Inputs
public class Inputs
Common inputs
Constructor Summary | |
---|---|
Inputs()
|
Method Summary | ||
---|---|---|
static Input<java.nio.ByteBuffer,java.io.IOException> |
byteBuffer(java.io.File source,
int bufferSize)
Read a file using ByteBuffer of a given size. |
|
static Input<java.nio.ByteBuffer,java.io.IOException> |
byteBuffer(java.io.InputStream source,
int bufferSize)
Read an inputstream using ByteBuffer of a given size. |
|
static
|
combine(java.lang.Iterable<Input<T,SenderThrowableType>> inputs)
Combine many Input into one single Input. |
|
static
|
iterable(java.lang.Iterable<T> iterable)
Create an Input that takes its items from the given Iterable. |
|
static Input<java.nio.ByteBuffer,java.io.IOException> |
output(Visitor<java.io.OutputStream,java.io.IOException> outputVisitor,
int bufferSize)
Create an Input that allows a Visitor to write to an OutputStream. |
|
static Input<java.lang.String,java.io.IOException> |
text(java.io.File source)
Read lines from a UTF-8 encoded textfile. |
|
static Input<java.lang.String,java.io.IOException> |
text(java.io.File source,
java.lang.String encoding)
Read lines from a textfile with the given encoding. |
|
static Input<java.lang.String,java.lang.RuntimeException> |
text(java.io.Reader source)
Read lines from a Reader. |
|
static Input<java.lang.String,java.lang.RuntimeException> |
text(java.lang.String source)
Read lines from a String. |
|
static Input<java.lang.String,java.io.IOException> |
text(java.net.URL source)
Read lines from a textfile at a given URL. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Inputs()
Method Detail |
---|
public static Input<java.lang.String,java.lang.RuntimeException> text(java.lang.String source)
source
- lines
public static Input<java.lang.String,java.lang.RuntimeException> text(java.io.Reader source)
source
- lines
public static Input<java.lang.String,java.io.IOException> text(java.io.File source)
source
- textfile with lines separated by \n character
public static Input<java.lang.String,java.io.IOException> text(java.io.File source, java.lang.String encoding)
source
- textfile with lines separated by \n characterencoding
- encoding of file, e.g. "UTF-8"
public static Input<java.lang.String,java.io.IOException> text(java.net.URL source)
source
- textfile with lines separated by \n character
public static Input<java.nio.ByteBuffer,java.io.IOException> byteBuffer(java.io.File source, int bufferSize)
source
- bufferSize
-
public static Input<java.nio.ByteBuffer,java.io.IOException> byteBuffer(java.io.InputStream source, int bufferSize)
source
- bufferSize
-
public static <T,SenderThrowableType extends java.lang.Throwable> Input<T,SenderThrowableType> combine(java.lang.Iterable<Input<T,SenderThrowableType>> inputs)
T
- SenderThrowableType
- inputs
-
public static <T> Input<T,java.lang.RuntimeException> iterable(java.lang.Iterable<T> iterable)
T
- iterable
-
public static Input<java.nio.ByteBuffer,java.io.IOException> output(Visitor<java.io.OutputStream,java.io.IOException> outputVisitor, int bufferSize)
outputVisitor
- bufferSize
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |