|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exist.fluent.Source
public abstract class Source
A source of data to be loaded into the database, distinguishing between XML documents and other (binary) documents. While you can load XML documents as binary without problem, but will not be able to query them or otherwise access their structure in the database.
Nested Class Summary | |
---|---|
static class |
Source.Blob
A source of binary data to be loaded into the database. |
static class |
Source.XML
A source of XML data to be loaded into the database. |
Method Summary | |
---|---|
static Source.Blob |
blob(byte[] bytes)
Create a source of binary data from the given byte array. |
static Source.Blob |
blob(File file)
Create a source that reads a binary document from an external file. |
static Source.Blob |
blob(InputStream stream)
Create a source of binary data that reads from the given input stream. |
static Source.Blob |
blob(Reader reader)
Create a source of binary data that reads from the given reader. |
static Source.Blob |
blob(String literal)
Create a source of binary data from the given string literal. |
static Source.Blob |
blob(URL url)
Create a source of binary data that reads from the given URL. |
Source |
encoding(String characterEncoding)
Set an encoding that indicates how the supplied bytes should be converted to characters or vice-versa. |
static Source.XML |
xml(byte[] bytes)
Create a source of XML data from the given byte array. |
static Source.XML |
xml(File file)
Create a source that reads an XML document from an external file. |
static Source.XML |
xml(InputStream stream)
Create a source of XML data that reads from the given input stream. |
static Source.XML |
xml(Reader reader)
Create a source of XML data that reads from the given reader. |
static Source.XML |
xml(String literal)
Create a source of XML data from the given string literal. |
static Source.XML |
xml(URL url)
Create a source of XML that reads from the given URL. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Source encoding(String characterEncoding)
characterEncoding
- the character encoding to use when dealing with this source
public static Source.XML xml(File file)
file
- the XML file
public static Source.Blob blob(File file)
file
- the binary file
public static Source.XML xml(InputStream stream)
stream
- the input stream to read the XML from
public static Source.Blob blob(InputStream stream)
stream
- the binary stream to read from
public static Source.XML xml(Reader reader)
reader
- the reader to read the XML from
public static Source.Blob blob(Reader reader)
reader
- the reader to read from
public static Source.XML xml(byte[] bytes)
bytes
- the source bytes
public static Source.Blob blob(byte[] bytes)
bytes
- the source bytes
public static Source.XML xml(String literal)
literal
- the contents of an XML document
public static Source.Blob blob(String literal)
literal
- the contents of the document
public static Source.XML xml(URL url) throws URISyntaxException
url
- the URL to read XML from
URISyntaxException
- if the URL syntax is not strictly spec-compliantpublic static Source.Blob blob(URL url)
url
- the URL to read binary data from
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |