org.nodal.util
Class ByteSeqUtil

java.lang.Object
  extended byorg.nodal.util.ByteSeqUtil

public final class ByteSeqUtil
extends java.lang.Object

A utility class for providing the ByteSeq interface to a variety of sources.

Author:
Lee Iverson

Constructor Summary
ByteSeqUtil()
           
 
Method Summary
static ByteSeq create(byte i)
          Create a ByteSeq interface for a single byte..
static ByteSeq create(byte[] a)
          Create an ByteSeq interface for an byte[] array.
static ByteSeq create(byte[] a, int len)
          Create an ByteSeq interface for a subsequence of a byte[] array.
static ByteSeq create(java.lang.Number n)
          Create a ByteSeq interface wrapper around Number (sequence of one).
static ByteSeq create(java.lang.Object v)
          Create an ByteSeq interface for an arbitrary Object.
static ByteSeq create(java.util.Vector v)
          Create an ByteSeq interface for a Vector.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteSeqUtil

public ByteSeqUtil()
Method Detail

create

public static final ByteSeq create(java.lang.Object v)
                            throws ConstraintFailure
Create an ByteSeq interface for an arbitrary Object.

Throws:
ConstraintFailure

create

public static final ByteSeq create(byte[] a,
                                   int len)
Create an ByteSeq interface for a subsequence of a byte[] array.


create

public static final ByteSeq create(byte[] a)
Create an ByteSeq interface for an byte[] array.


create

public static final ByteSeq create(java.util.Vector v)
                            throws TypeConstraintFailure
Create an ByteSeq interface for a Vector.

Tested on creation for validity.

Throws:
TypeConstraintFailure

create

public static final ByteSeq create(byte i)
Create a ByteSeq interface for a single byte..


create

public static final ByteSeq create(java.lang.Number n)
                            throws TypeConstraintFailure
Create a ByteSeq interface wrapper around Number (sequence of one).

Throws:
TypeConstraintFailure