com.latencybusters.lbm.sdm
Class LBMSDMRawBlob

java.lang.Object
  extended by com.latencybusters.lbm.sdm.LBMSDM
      extended by com.latencybusters.lbm.sdm.LBMSDMRaw
          extended by com.latencybusters.lbm.sdm.LBMSDMRawBlob
All Implemented Interfaces:
java.lang.Cloneable

public class LBMSDMRawBlob
extends LBMSDMRaw
implements java.lang.Cloneable

An LBMSDMRawBlob is a helper class to minimise the effort of formatting and parsing Binary Large OBjects (BLOBs)


Field Summary
 
Fields inherited from class com.latencybusters.lbm.sdm.LBMSDM
DEBUG_BASIC, debug_level, DEBUG_VERBOSE_PARSING
 
Constructor Summary
LBMSDMRawBlob(byte[] b)
          Create a new blob with a specified byte array.
LBMSDMRawBlob(byte[] b, int offset, int size)
          Create a new blob from a part of an existing byte array
LBMSDMRawBlob(int len)
          Create a new blob with a specified length.
LBMSDMRawBlob(java.lang.String s)
          Create a new blob from a string.
 
Method Summary
 LBMSDMRawBlob clone()
          Get a copy of this blob
 byte[] get()
          Get the blob byte array
 int length()
          Get the length of the blob
 java.lang.String toString()
          Get the blob in a hex string format x"1234...." etc.
 
Methods inherited from class com.latencybusters.lbm.sdm.LBMSDMRaw
toDbgString
 
Methods inherited from class com.latencybusters.lbm.sdm.LBMSDM
log, set_debug_level
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LBMSDMRawBlob

public LBMSDMRawBlob(int len)
Create a new blob with a specified length.

Parameters:
len - The length of the blob

LBMSDMRawBlob

public LBMSDMRawBlob(byte[] b)
Create a new blob with a specified byte array.

Parameters:
b - The buffer to be used for the blob

LBMSDMRawBlob

public LBMSDMRawBlob(byte[] b,
                     int offset,
                     int size)
Create a new blob from a part of an existing byte array

Parameters:
b - The buffer to be used for the blob
offset - The offset in the buffer to start copying from
size - The size of the block to be copied

LBMSDMRawBlob

public LBMSDMRawBlob(java.lang.String s)
Create a new blob from a string. Either a basic string can be used or a hex encoded string in the form of x"0123456789abcdef" can be used. This format means byte one will be 0x01, byte two 0x23 etc

Parameters:
s - The string to be used for the blob
Method Detail

length

public int length()
Get the length of the blob

Returns:
The length of the blob

get

public byte[] get()
Get the blob byte array

Returns:
The blobs byte array

toString

public java.lang.String toString()
Get the blob in a hex string format x"1234...." etc.

Overrides:
toString in class java.lang.Object
Returns:
The hex string representing the blob

clone

public LBMSDMRawBlob clone()
                    throws java.lang.CloneNotSupportedException
Get a copy of this blob

Overrides:
clone in class java.lang.Object
Returns:
A cloned object
Throws:
java.lang.CloneNotSupportedException


All of the documentation and software included in this and any other Informatica Inc "Ultra Messaging" Release is Copyright (C) 2004-2014, Informatica Corporation. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted only as covered by the terms of a valid software license agreement with 29West Inc. Copyright © 2004-2014, Informatica, Inc. All Rights Reserved.