org.kth.dks
Class DKSObject

java.lang.Object
  extended by org.kth.dks.DKSObject

public class DKSObject
extends java.lang.Object

Title: DKSObject class

Description: A simple wrapper for a byte array

Copyright: Copyright (c) 2004

Company: KTH-IMIT

Version:
1.0
Author:
not attributable

Constructor Summary
DKSObject(byte[] newData)
          Makes a shallow copy of the byte stream, object type will be DKSObjectTypes.DEFAULT
DKSObject(DKSObjectTypes type, byte[] newData)
          Makes a shallow copy of the byte stream, object type will be type
DKSObject(java.lang.String base64)
          WARNING!
 
Method Summary
 byte[] getData()
          Returns the internal byte array that this wrapper class stores
 DKSObjectTypes getType()
          Each DKSObject has a DKSObjectType value associated with it to allow multiplexing without looking at the payload
 java.lang.String toString()
          WARNING!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DKSObject

public DKSObject(byte[] newData)
Makes a shallow copy of the byte stream, object type will be DKSObjectTypes.DEFAULT

Parameters:
newData - byte[] arbitrary byte array

DKSObject

public DKSObject(DKSObjectTypes type,
                 byte[] newData)
Makes a shallow copy of the byte stream, object type will be type

Parameters:
type - DKSObjectTypes type of the object
newData - byte[] arbitrary byte array

DKSObject

public DKSObject(java.lang.String base64)
WARNING! This constructor should not be public It is used internally to take a BASE64 representation of an byte array

Parameters:
base64 - String representation of the byte array in BASE64 encoding
Method Detail

getType

public DKSObjectTypes getType()
Each DKSObject has a DKSObjectType value associated with it to allow multiplexing without looking at the payload

Returns:
DKSObjectTypes type of this DKSObject

getData

public byte[] getData()
Returns the internal byte array that this wrapper class stores

Returns:
byte[]

toString

public java.lang.String toString()
WARNING! This method should not be public It returns a BASE64 encoded version of the internal byte array

Overrides:
toString in class java.lang.Object
Returns:
String


Copyright © 2010. All Rights Reserved.