- 
Method SummaryModifier and TypeMethodDescriptionfinal @Nullable Filefile()The file if this is aFilebased source, ornullif no file is available.final @Nullable Stringname()The name of the file if this is aFilebased source, ornullif no name is available.static final Sourceof(byte[] bytes) Create a source from binary data.static final SourceCreate a source from binary data using a specific character set.static final SourceCreate a source from binary data using a specific character set.static final Sourceof(byte[] bytes, CharsetDecoder charsetDecoder) Create a source from binary data using a specific character set.static final SourceCreate a source from a file.static final SourceCreate a source from a file using a specific character set.static final SourceCreate a source from a file using a specific character set.static final Sourceof(File file, CharsetDecoder charsetDecoder) Create a source from a file using a specific character set.static final Sourceof(InputStream inputStream) Create a source from an input stream.static final Sourceof(InputStream inputStream, int length) Create a source from an input stream.static final Sourceof(InputStream inputStream, int length, String charsetName) Create a source from an input stream using a specific character set.static final Sourceof(InputStream inputStream, int length, Charset charset) Create a source from an input stream using a specific character set.static final Sourceof(InputStream inputStream, int length, CharsetDecoder charsetDecoder) Create a source from an input stream using a specific character set.static final Sourceof(InputStream inputStream, String charsetName) Create a source from an input stream using a specific character set.static final Sourceof(InputStream inputStream, Charset charset) Create a source from an input stream using a specific character set.static final Sourceof(InputStream inputStream, CharsetDecoder charsetDecoder) Create a source from an input stream using a specific character set.static final SourceCreate a source from a reader.static final SourceCreate a source from a reader.static final SourceCreate a source from a string.final @NotNull Readerreader()Produce a reader from this source.final @NotNull StringRead the entirereader()into a String, for convenience.static final SourceCreate a source from a string that may represent a resource.static final SourceCreate a source from a string that may represent a resource using a specific character set.static final SourceCreate a source from a string that may represent a resource using a specific character set.static final Sourceresolve(String string, CharsetDecoder charsetDecoder) Create a source from a string that may represent a resource using a specific character set.toString()
- 
Method Details- 
resolveCreate a source from a string that may represent a resource.The following resource types are attempted to be resolved, in order: - A classpath resource
- A file system resource
- A non-resource string (see of(String))
 Note that if users expect a resource descriptor to resolve, but the resource is not found, instead of throwing an exception on reader()orreadString(), this will just produce the input string again, as ifof(String)was called.
- 
resolveCreate a source from a string that may represent a resource using a specific character set.The following resource types are attempted to be resolved, in order: - A classpath resource
- A file system resource
- A non-resource string (see of(String))
 Note that if users expect a resource descriptor to resolve, but the resource is not found, instead of throwing an exception on reader()orreadString(), this will just produce the input string again, as ifof(String)was called.
- 
resolveCreate a source from a string that may represent a resource using a specific character set.The following resource types are attempted to be resolved, in order: - A classpath resource
- A file system resource
- A non-resource string (see of(String))
 Note that if users expect a resource descriptor to resolve, but the resource is not found, instead of throwing an exception on reader()orreadString(), this will just produce the input string again, as ifof(String)was called.
- 
resolveCreate a source from a string that may represent a resource using a specific character set.The following resource types are attempted to be resolved, in order: - A classpath resource
- A file system resource
- A non-resource string (see of(String))
 Note that if users expect a resource descriptor to resolve, but the resource is not found, instead of throwing an exception on reader()orreadString(), this will just produce the input string again, as ifof(String)was called.
- 
ofCreate a source from a string.
- 
ofCreate a source from binary data.
- 
ofCreate a source from binary data using a specific character set.
- 
ofCreate a source from binary data using a specific character set.
- 
ofCreate a source from binary data using a specific character set.
- 
ofCreate a source from a file.
- 
ofCreate a source from a file using a specific character set.
- 
ofCreate a source from a file using a specific character set.
- 
ofCreate a source from a file using a specific character set.
- 
ofCreate a source from a reader.
- 
ofCreate a source from a reader.
- 
ofCreate a source from an input stream.
- 
ofCreate a source from an input stream using a specific character set.
- 
ofCreate a source from an input stream using a specific character set.
- 
ofCreate a source from an input stream using a specific character set.
- 
ofCreate a source from an input stream.
- 
ofCreate a source from an input stream using a specific character set.
- 
ofCreate a source from an input stream using a specific character set.
- 
ofCreate a source from an input stream using a specific character set.
- 
nameThe name of the file if this is aFilebased source, ornullif no name is available.
- 
fileThe file if this is aFilebased source, ornullif no file is available.
- 
readerProduce a reader from this source.- Throws:
- IOException- When something goes wrong creating a reader from this source.
 
- 
readStringRead the entirereader()into a String, for convenience.- Throws:
- IOException- When something goes wrong creating a reader from this source.
 
- 
toString
 
-