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: 725712 $, $Date: 2008-12-11 16:32:04 +0100 (Thu, 11 Dec 2008) $
Author:
Apache Directory Project

Constructor Summary
ResourceRecordEncoder()
           
 
Method Summary
 void put(org.apache.mina.core.buffer.IoBuffer byteBuffer, ResourceRecord record)
          Encodes the ResourceRecord into the ByteBuffer.
protected  void putCharacterString(org.apache.mina.core.buffer.IoBuffer byteBuffer, java.lang.String characterString)
           is a single length octet followed by that number of characters.
protected  void putDataSize(org.apache.mina.core.buffer.IoBuffer byteBuffer, int startPosition)
           
protected  void putDomainName(org.apache.mina.core.buffer.IoBuffer 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.core.buffer.IoBuffer byteBuffer, RecordClass recordClass)
           
protected  void putRecordType(org.apache.mina.core.buffer.IoBuffer byteBuffer, RecordType recordType)
           
protected  void putResourceRecord(org.apache.mina.core.buffer.IoBuffer byteBuffer, ResourceRecord record)
           
protected abstract  void putResourceRecordData(org.apache.mina.core.buffer.IoBuffer 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.core.buffer.IoBuffer 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.core.buffer.IoBuffer byteBuffer,
                                              ResourceRecord record)

putResourceRecord

protected void putResourceRecord(org.apache.mina.core.buffer.IoBuffer byteBuffer,
                                 ResourceRecord record)

putDataSize

protected void putDataSize(org.apache.mina.core.buffer.IoBuffer byteBuffer,
                           int startPosition)

putDomainName

protected void putDomainName(org.apache.mina.core.buffer.IoBuffer 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.core.buffer.IoBuffer byteBuffer,
                             RecordType recordType)

putRecordClass

protected void putRecordClass(org.apache.mina.core.buffer.IoBuffer byteBuffer,
                              RecordClass recordClass)

putCharacterString

protected void putCharacterString(org.apache.mina.core.buffer.IoBuffer 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-2011 Apache Software Foundation. All Rights Reserved.