- java.lang.Object
-
- org.jooq.Source
-
public final class Source extends Object
A source of text data.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Source
of(byte[] bytes)
Create a source from binary data.static Source
of(byte[] bytes, String charsetName)
Create a source from binary data using a specific character set.static Source
of(byte[] bytes, Charset charset)
Create a source from binary data using a specific character set.static Source
of(byte[] bytes, CharsetDecoder charsetDecoder)
Create a source from binary data using a specific character set.static Source
of(File file)
Create a source from a file.static Source
of(File file, String charsetName)
Create a source from a file using a specific character set.static Source
of(File file, Charset charset)
Create a source from a file using a specific character set.static Source
of(File file, CharsetDecoder charsetDecoder)
Create a source from a file using a specific character set.static Source
of(InputStream inputStream)
Create a source from an input stream.static Source
of(InputStream inputStream, String charsetName)
Create a source from an input stream using a specific character set.static Source
of(InputStream inputStream, Charset charset)
Create a source from an input stream using a specific character set.static Source
of(InputStream inputStream, CharsetDecoder charsetDecoder)
Create a source from an input stream using a specific character set.static Source
of(Reader reader)
Create a source from a reader.static Source
of(String string)
Create a source from a string.Reader
reader()
Produce a reader from this source.String
readString()
Read the entirereader()
into a String, for convenience.String
toString()
-
-
-
Method Detail
-
of
public static final Source of(byte[] bytes)
Create a source from binary data.
-
of
public static final Source of(byte[] bytes, String charsetName)
Create a source from binary data using a specific character set.
-
of
public static final Source of(byte[] bytes, Charset charset)
Create a source from binary data using a specific character set.
-
of
public static final Source of(byte[] bytes, CharsetDecoder charsetDecoder)
Create a source from binary data using a specific character set.
-
of
public static final Source of(File file, String charsetName)
Create a source from a file using a specific character set.
-
of
public static final Source of(File file, Charset charset)
Create a source from a file using a specific character set.
-
of
public static final Source of(File file, CharsetDecoder charsetDecoder)
Create a source from a file using a specific character set.
-
of
public static final Source of(InputStream inputStream)
Create a source from an input stream.
-
of
public static final Source of(InputStream inputStream, String charsetName)
Create a source from an input stream using a specific character set.
-
of
public static final Source of(InputStream inputStream, Charset charset)
Create a source from an input stream using a specific character set.
-
of
public static final Source of(InputStream inputStream, CharsetDecoder charsetDecoder)
Create a source from an input stream using a specific character set.
-
reader
public final Reader reader() throws IOException
Produce a reader from this source.- Throws:
IOException
- When something goes wrong creating a reader from this source.
-
readString
public final String readString() throws IOException
Read the entirereader()
into a String, for convenience.- Throws:
IOException
- When something goes wrong creating a reader from this source.
-
-