|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.io.InputStream | +--java.io.FilterInputStream | +--java.io.BufferedInputStream | +--org.opencyc.api.CfaslInputStream
A CFASL translating input stream. All Java-native types which have logical sublisp equivalents are translated automatically by this stream. Classes implementing the CfaslTranslatingObject interface are created using thier readObject() method. Other CYC objects, such as binding-lists and formulas, must be explicitly coerced using their static constructors.
Copyright 2001 Cycorp, Inc., license is open source GNU LGPL.
THIS SOFTWARE AND KNOWLEDGE BASE CONTENT ARE PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OPENCYC ORGANIZATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE AND KNOWLEDGE BASE CONTENT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Field Summary | |
static int |
API_TRACE_DETAILED
Detailed api trace. |
static int |
API_TRACE_MESSAGES
Message-level api trace. |
static int |
API_TRACE_NONE
No api trace. |
protected static int |
CFASL_ASSERTION
|
protected static int |
CFASL_ASSERTION_DEF
|
protected static int |
CFASL_ASSERTION_SHELL
|
protected static int |
CFASL_AXIOM
|
protected static int |
CFASL_AXIOM_DEF
|
protected static int |
CFASL_BTREE_HIGH
|
protected static int |
CFASL_BTREE_LEAF
|
protected static int |
CFASL_BTREE_LOW
|
protected static int |
CFASL_BTREE_LOW_HIGH
|
protected static int |
CFASL_BYTE_VECTOR
|
protected static int |
CFASL_CHARACTER
|
protected static int |
CFASL_CONSTANT
|
protected static int |
CFASL_DICTIONARY
|
protected static int |
CFASL_DOTTED
|
protected static int |
CFASL_GUID
|
protected static int |
CFASL_HASHTABLE
|
protected static int |
CFASL_IMMEDIATE_FIXNUM_CUTOFF
|
protected static int |
CFASL_IMMEDIATE_FIXNUM_OFFSET
|
protected static int |
CFASL_INDEX
|
protected static int |
CFASL_KEYWORD
|
protected static int |
CFASL_LIST
|
protected static int |
CFASL_N_16BIT_INT
|
protected static int |
CFASL_N_24BIT_INT
|
protected static int |
CFASL_N_32BIT_INT
|
protected static int |
CFASL_N_8BIT_INT
|
protected static int |
CFASL_N_BIGNUM
|
protected static int |
CFASL_N_FLOAT
|
protected static int |
CFASL_NART
|
protected static int |
CFASL_NIL
|
protected static int |
CFASL_P_16BIT_INT
|
protected static int |
CFASL_P_24BIT_INT
|
protected static int |
CFASL_P_32BIT_INT
|
protected static int |
CFASL_P_8BIT_INT
|
protected static int |
CFASL_P_BIGNUM
|
protected static int |
CFASL_P_FLOAT
|
protected static int |
CFASL_SERVER_DEATH
|
protected static int |
CFASL_SOURCE
|
protected static int |
CFASL_SOURCE_DEF
|
protected static int |
CFASL_SPECIAL_OBJECT
|
protected static int |
CFASL_STRING
|
protected static int |
CFASL_SYMBOL
|
protected static int |
CFASL_VARIABLE
|
protected static int |
CFASL_VECTOR
|
protected static int |
DEFAULT_READ_LIMIT
|
int |
trace
Parameter that, when true, causes a trace of the messages to and from the server. |
Fields inherited from class java.io.BufferedInputStream |
buf, count, marklimit, markpos, pos |
Fields inherited from class java.io.FilterInputStream |
in |
Constructor Summary | |
CfaslInputStream(java.io.InputStream in)
Creates a new CfaslInputStream to read data from the specified underlying input stream. |
Method Summary | |
protected void |
initializeOpcodeDescriptions()
Initializes the opcode descriptions used in trace output. |
CycAssertion |
readAssertion()
Reads an assertion from a CfaslInputStream. |
ByteArray |
readByteArray()
Reads a byte vector from the CfaslInputStream. |
char |
readChar()
Reads an char from this CfaslInputStream. |
CycList |
readCons()
Reads a dotted list from the CfaslInputStream. |
CycConstant |
readConstant()
Reads a constant from a CfaslInputStream. |
CycList |
readCycList()
Reads a list from the CfaslInputStream. |
double |
readDouble()
Reads a double from this CfaslInputStream. |
Guid |
readGuid()
Reads the body of a Guid from the CfaslInputStream. |
int |
readInt()
Reads an int from this CfaslInputStream. |
CycSymbol |
readKeyword()
Reads the body of a keyword Symbol from the CfaslInputStream. |
CycNart |
readNart()
Reads a NART from a CfaslInputStream. |
java.lang.Object |
readObject()
Reads an Object from this CfaslInputStream. |
java.lang.Object |
readSymbol()
Reads the body of a Symbol or EL variable from the CfaslInputStream. |
CycVariable |
readVariable()
Reads a variable from the CfaslInputStream. |
Methods inherited from class java.io.BufferedInputStream |
available, close, mark, markSupported, read, read, reset, skip |
Methods inherited from class java.io.FilterInputStream |
read |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int API_TRACE_NONE
public static final int API_TRACE_MESSAGES
public static final int API_TRACE_DETAILED
public int trace
protected static final int CFASL_IMMEDIATE_FIXNUM_CUTOFF
protected static final int CFASL_IMMEDIATE_FIXNUM_OFFSET
protected static final int CFASL_P_8BIT_INT
protected static final int CFASL_N_8BIT_INT
protected static final int CFASL_P_16BIT_INT
protected static final int CFASL_N_16BIT_INT
protected static final int CFASL_P_24BIT_INT
protected static final int CFASL_N_24BIT_INT
protected static final int CFASL_P_32BIT_INT
protected static final int CFASL_N_32BIT_INT
protected static final int CFASL_P_FLOAT
protected static final int CFASL_N_FLOAT
protected static final int CFASL_KEYWORD
protected static final int CFASL_SYMBOL
protected static final int CFASL_NIL
protected static final int CFASL_LIST
protected static final int CFASL_DOTTED
protected static final int CFASL_VECTOR
protected static final int CFASL_STRING
protected static final int CFASL_CHARACTER
protected static final int CFASL_HASHTABLE
protected static final int CFASL_BTREE_LOW_HIGH
protected static final int CFASL_BTREE_LOW
protected static final int CFASL_BTREE_HIGH
protected static final int CFASL_BTREE_LEAF
protected static final int CFASL_P_BIGNUM
protected static final int CFASL_N_BIGNUM
protected static final int CFASL_GUID
protected static final int CFASL_BYTE_VECTOR
protected static final int CFASL_CONSTANT
protected static final int CFASL_NART
protected static final int CFASL_ASSERTION
protected static final int CFASL_ASSERTION_SHELL
protected static final int CFASL_ASSERTION_DEF
protected static final int CFASL_SOURCE
protected static final int CFASL_SOURCE_DEF
protected static final int CFASL_AXIOM
protected static final int CFASL_AXIOM_DEF
protected static final int CFASL_VARIABLE
protected static final int CFASL_INDEX
protected static final int CFASL_SPECIAL_OBJECT
protected static final int CFASL_DICTIONARY
protected static final int CFASL_SERVER_DEATH
protected static final int DEFAULT_READ_LIMIT
Constructor Detail |
public CfaslInputStream(java.io.InputStream in)
in
- the underlying input stream.Method Detail |
protected void initializeOpcodeDescriptions()
public java.lang.Object readObject() throws java.io.IOException
public char readChar() throws java.io.IOException
public double readDouble() throws java.io.IOException
public int readInt() throws java.io.IOException
public CycSymbol readKeyword() throws java.io.IOException
public java.lang.Object readSymbol() throws java.io.IOException
public Guid readGuid() throws java.io.IOException
public ByteArray readByteArray() throws java.io.IOException
public CycList readCycList() throws java.io.IOException
public CycList readCons() throws java.io.IOException
public CycConstant readConstant() throws java.io.IOException
public CycVariable readVariable() throws java.io.IOException
public CycNart readNart() throws java.io.IOException
public CycAssertion readAssertion() throws java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |