public final class OCLInput
extends java.lang.Object
Constructor and Description |
---|
OCLInput(java.io.InputStream oclStream)
Creates an OCL document from an input stream, using the default character
set to decode it.
|
OCLInput(java.io.InputStream oclStream,
java.lang.String encoding)
Creates an OCL document from an input stream in the specified encoding.
|
OCLInput(java.io.Reader oclReader)
Creates an OCL document from a character stream.
|
OCLInput(java.lang.String oclText)
Creates an OCL document from a string.
|
Modifier and Type | Method and Description |
---|---|
char[] |
getContent()
The contents of the OCL document as a character array, suitable for
consumption by the OCL parser.
|
java.io.Reader |
getContentAsStream()
The contents of the OCL document as a character stream, suitable for
consumption by the OCL parser.
|
java.lang.String |
getContentAsString()
The contents of the OCL document as a character array, suitable for
consumption by the OCL parser.
|
public OCLInput(java.lang.String oclText)
oclText
- the string containing the OCL documentpublic OCLInput(java.io.InputStream oclStream)
oclStream
- the input stream providing the OCL documentpublic OCLInput(java.io.InputStream oclStream, java.lang.String encoding) throws java.io.UnsupportedEncodingException
oclStream
- the input stream providing the OCL documentencoding
- the stream's character encodingjava.io.UnsupportedEncodingException
- if the specified encoding is not
supported in this virtual machinepublic OCLInput(java.io.Reader oclReader)
oclReader
- the stream providing the OCL documentpublic char[] getContent() throws ParserException
ParserException
- on an I/O failure in reading the contentpublic java.lang.String getContentAsString() throws ParserException
ParserException
- on an I/O failure in reading the contentpublic java.io.Reader getContentAsStream()