Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.verisign.epp.framework
Class EPPXMLByteArrayAssembler

    java.lang.Object
      com.verisign.epp.framework.EPPXMLByteArrayAssembler

All Implemented Interfaces:
  EPPByteArrayAssembler

    public class EPPXMLByteArrayAssembler

extends java.lang.Object
implements EPPByteArrayAssembler

The `EPPXMLByteArrayAssembler` class provides an implementation of `EPPByteArrayAssembler` that can assemble/disassemble `EPPMessage`s and `EPPEventResponse`s to and from `byte` arrays that contain the streamed XML.

Version:
  1.0 Dec 04, 2006
Author:
  Srikanth Veeramachaneni
See Also:
  `EPPByteArrayAssembler`

Constructor Summary
`EPPXMLByteArrayAssembler()` Construct and instance of an `EPPXMLByteArrayAssembler`

Method Summary
`EPPEvent` | `decode(byte[] aBytes, java.lang.Object aData)` Takes an input `byte` array and reads XML from it to create an `EPPEvent`
`byte[]` | `encode(EPPEventResponse aResponse, java.lang.Object aData)` Takes an `EPPEventResponse` and serializes it to a `byte` array in XML Format.
`static byte[]` | `toBytes(int aInteger)` Converts an integer to a byte array of size 4 with first array element containing the first 8 bits of the integer, the second array element containing the 9th to 16th bits of the integer, the third array element containing the 17th to 24th bits of the integer and the last array element containing the last 8 bits of the integer.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### EPPXMLByteArrayAssembler

    public EPPXMLByteArrayAssembler()

  Construct and instance of an `EPPXMLByteArrayAssembler`

Method Detail

### toBytes

    public static byte[] toBytes(int aInteger)

  Converts an integer to a byte array of size 4 with first array element containing the first 8 bits of the integer, the second array element containing the 9th to 16th bits of the integer, the third array element containing the 17th to 24th bits of the integer and the last array element containing the last 8 bits of the integer.

  Parameters:
    `aInteger` - The integer that needs to be converted to a byte array.
  Returns:
    The byte array representation of the integer.

### decode

    public EPPEvent decode(byte[] aBytes,
                           java.lang.Object aData)
                    throws EPPAssemblerException

  Takes an input `byte` array and reads XML from it to create an `EPPEvent`

  Specified by:
    `decode` in interface `EPPByteArrayAssembler`
  Parameters:
    `aBytes` - The byte array to read data from.
    `aData` - A data object which can be used to store context information.
  Returns:
    EPPEvent The `EPPEvent` that is created from the InputStream
  Throws:
    `EPPAssemblerException` - Error creating the `EPPEvent`

### encode

    public byte[] encode(EPPEventResponse aResponse,
                         java.lang.Object aData)
                  throws EPPAssemblerException

  Takes an `EPPEventResponse` and serializes it to a `byte` array in XML Format.

  Specified by:
    `encode` in interface `EPPByteArrayAssembler`
  Parameters:
    `aResponse` - The response that will be serialized
    `aData` - A data object which can be used to store context information.
  Throws:
    `EPPAssemblerException` - Error serializing the `EPPEventResponse`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © VeriSign Inc. All Rights Reserved.