public abstract class Source
extends java.lang.Object
implements java.io.Closeable
| Constructor and Description |
|---|
Source() |
| Modifier and Type | Method and Description |
|---|---|
static Source |
fromFile(java.lang.String file)
Returns a Source based of the given file name.
|
static Source |
fromStream(java.io.InputStream stream)
Returns a Source based of the given input stream
This method does not validate the given stream. |
static Source |
fromURL(java.lang.String url)
Returns a Source based of the given URL.
|
abstract Result<java.io.InputStream> |
mkStream()
Returns the Source as an input stream
|
Result<java.lang.String> |
mkString()
reads the source into a string
|
Result<XML> |
mkXML()
reads the source into an XML document
|
public static Source fromFile(java.lang.String file)
file - the file namepublic static Source fromStream(java.io.InputStream stream)
stream - the input streampublic static Source fromURL(java.lang.String url)
url - the source urlpublic abstract Result<java.io.InputStream> mkStream()
public Result<java.lang.String> mkString()
Copyright © 2018. All Rights Reserved.