JADE_SL.lang
Class ByteArrayCodec

java.lang.Object
  extended byJADE_SL.lang.Codec
      extended byJADE_SL.lang.ByteArrayCodec

public abstract class ByteArrayCodec
extends Codec

Base class for content language codecs that transform AbsContentElements to/from sequences of bytes

Author:
Giovanni Caire - TILAB

Nested Class Summary
 
Nested classes inherited from class JADE_SL.lang.Codec
Codec.CodecException
 
Field Summary
 
Fields inherited from class JADE_SL.lang.Codec
UNNAMEDPREFIX
 
Constructor Summary
ByteArrayCodec(java.lang.String name)
          Construct a ByteArrayCodec object with the given name
 
Method Summary
abstract  AbsContentElement decode(byte[] content)
          Decodes the content to an abstract description.
abstract  AbsContentElement decode(Ontology ontology, byte[] content)
          Decodes the content to an abstract description.
abstract  byte[] encode(AbsContentElement content)
          Encodes a content into a byte array.
abstract  byte[] encode(Ontology ontology, AbsContentElement content)
          Encodes a content into a byte array.
 
Methods inherited from class JADE_SL.lang.Codec
getInnerOntology, getName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArrayCodec

public ByteArrayCodec(java.lang.String name)
Construct a ByteArrayCodec object with the given name

Method Detail

encode

public abstract byte[] encode(AbsContentElement content)
                       throws Codec.CodecException
Encodes a content into a byte array.

Parameters:
content - the content as an abstract descriptor.
Returns:
the content as a byte array.
Throws:
CodecException
Codec.CodecException

encode

public abstract byte[] encode(Ontology ontology,
                              AbsContentElement content)
                       throws Codec.CodecException
Encodes a content into a byte array.

Parameters:
ontology - the ontology
content - the content as an abstract descriptor.
Returns:
the content as a byte array.
Throws:
CodecException
Codec.CodecException

decode

public abstract AbsContentElement decode(byte[] content)
                                  throws Codec.CodecException
Decodes the content to an abstract description.

Parameters:
content - the content as a byte array.
Returns:
the content as an abstract description.
Throws:
CodecException
Codec.CodecException

decode

public abstract AbsContentElement decode(Ontology ontology,
                                         byte[] content)
                                  throws Codec.CodecException
Decodes the content to an abstract description.

Parameters:
ontology - the ontology.
content - the content as a byte array.
Returns:
the content as an abstract description.
Throws:
CodecException
Codec.CodecException


Copyright © 2000-2003 BT Exact Technologies. All Rights Reserved.