org.apache.directory.server.dns.io.encoder
Class ResourceRecordEncoder

java.lang.Object
  extended by org.apache.directory.server.dns.io.encoder.ResourceRecordEncoder
All Implemented Interfaces:
RecordEncoder
Direct Known Subclasses:
AddressRecordEncoder, CanonicalNameRecordEncoder, MailExchangeRecordEncoder, NameServerRecordEncoder, PointerRecordEncoder, ServerSelectionRecordEncoder, StartOfAuthorityRecordEncoder, TextRecordEncoder

public abstract class ResourceRecordEncoder
extends java.lang.Object
implements RecordEncoder

Version:
$Rev: 547508 $, $Date: 2007-06-15 05:28:19 +0200 (Fr, 15 Jun 2007) $
Author:
Apache Directory Project

Constructor Summary
ResourceRecordEncoder()
           
 
Method Summary
 void put(org.apache.mina.common.ByteBuffer byteBuffer, ResourceRecord record)
          Encodes the ResourceRecord into the ByteBuffer.
protected  void putCharacterString(org.apache.mina.common.ByteBuffer byteBuffer, java.lang.String characterString)
           is a single length octet followed by that number of characters.
protected  void putDataSize(org.apache.mina.common.ByteBuffer byteBuffer, int startPosition)
           
protected  void putDomainName(org.apache.mina.common.ByteBuffer byteBuffer, java.lang.String domainName)
           is a domain name represented as a series of labels, and terminated by a label with zero length.
protected  void putRecordClass(org.apache.mina.common.ByteBuffer byteBuffer, RecordClass recordClass)
           
protected  void putRecordType(org.apache.mina.common.ByteBuffer byteBuffer, RecordType recordType)
           
protected  void putResourceRecord(org.apache.mina.common.ByteBuffer byteBuffer, ResourceRecord record)
           
protected abstract  void putResourceRecordData(org.apache.mina.common.ByteBuffer byteBuffer, ResourceRecord record)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceRecordEncoder

public ResourceRecordEncoder()
Method Detail

put

public void put(org.apache.mina.common.ByteBuffer byteBuffer,
                ResourceRecord record)
         throws java.io.IOException
Description copied from interface: RecordEncoder
Encodes the ResourceRecord into the ByteBuffer.

Specified by:
put in interface RecordEncoder
Throws:
java.io.IOException

putResourceRecordData

protected abstract void putResourceRecordData(org.apache.mina.common.ByteBuffer byteBuffer,
                                              ResourceRecord record)

putResourceRecord

protected void putResourceRecord(org.apache.mina.common.ByteBuffer byteBuffer,
                                 ResourceRecord record)

putDataSize

protected void putDataSize(org.apache.mina.common.ByteBuffer byteBuffer,
                           int startPosition)

putDomainName

protected void putDomainName(org.apache.mina.common.ByteBuffer byteBuffer,
                             java.lang.String domainName)
is a domain name represented as a series of labels, and terminated by a label with zero length.

Parameters:
byteBuffer - the ByteBuffer to encode the domain name into
domainName - the domain name to encode

putRecordType

protected void putRecordType(org.apache.mina.common.ByteBuffer byteBuffer,
                             RecordType recordType)

putRecordClass

protected void putRecordClass(org.apache.mina.common.ByteBuffer byteBuffer,
                              RecordClass recordClass)

putCharacterString

protected void putCharacterString(org.apache.mina.common.ByteBuffer byteBuffer,
                                  java.lang.String characterString)
is a single length octet followed by that number of characters. is treated as binary information, and can be up to 256 characters in length (including the length octet).

Parameters:
byteBuffer - The byte buffer to encode the character string into.
characterString - the character string to encode


Copyright © 2003-2009 Apache Software Foundation. All Rights Reserved.