|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opencyc.cycobject.ByteArray
Contains an array of bytes, as an object that directly represents a SubL byte vector. The primitive element in java is a byte having a signed numerical value between -128 and +127. The corresponding primitive element in SubL is a byte having an unsigned numerical value between 0 and 255.
The ByteArray object can only be used in the OpenCyc binary api because it does not have a string representation in either SubL or java.
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 java.lang.String |
byteVectorXMLTag
the name of the XML tag for Cyc byte-vector objects |
static java.lang.String |
byteXMLTag
the name of the XML tag for the byte elements of Cyc byte-vector objects |
static int |
indentLength
the default indentation for printing CycConstant objects to XML |
static java.lang.String |
lengthXMLTag
the name of the XML tag for the length of Cyc byte-vector objects |
Constructor Summary | |
ByteArray(byte[] bytes)
Creates a new byte array from the specified array of bytes. |
Method Summary | |
byte[] |
byteArrayValue()
Returns the array of bytes of this ByteArray. |
boolean |
equals(java.lang.Object object)
Returns true iff some object equals this ByteArray |
java.lang.String |
toString()
Returns the string representation of the ByteArray |
void |
toXML(XMLWriter xmlWriter,
int indent,
boolean relative)
Prints the XML representation of this ByteArray to an XMLWriter |
java.lang.String |
toXMLString()
Marshalls this ByteArray object into its CYC-ML XML expression. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String byteVectorXMLTag
public static final java.lang.String lengthXMLTag
public static final java.lang.String byteXMLTag
public static int indentLength
Constructor Detail |
public ByteArray(byte[] bytes)
Method Detail |
public byte[] byteArrayValue()
public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- the Object for equality comparisonpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toXMLString() throws java.io.IOException
public void toXML(XMLWriter xmlWriter, int indent, boolean relative) throws java.io.IOException
XMLWriter
xmlWriter
- an XMLWriterindent
- an int that specifies by how many spaces to indentrelative
- a boolean; if true indentation is relative, otherwise absolute
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |