org.snmp4j.security
Class ByteArrayWindow

java.lang.Object
  extended by org.snmp4j.security.ByteArrayWindow

public class ByteArrayWindow
extends java.lang.Object

The ByteArrayWindow provides windowed access to a subarray of a byte array.

Version:
1.0
Author:
Frank Fock

Constructor Summary
ByteArrayWindow(byte[] value, int offset, int length)
          Creates a byte array window that provides access to the bytes in the supplied array between the position starting at the supplied offset.
 
Method Summary
 boolean equals(ByteArrayWindow other, int maxBytesToCompare)
           
 boolean equals(java.lang.Object obj)
          Indicates whether some other object is "equal to" this one.
 byte get(int i)
           
 int getLength()
           
 int getOffset()
           
 byte[] getValue()
           
 void set(int i, byte b)
           
 void setValue(byte[] value)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ByteArrayWindow

public ByteArrayWindow(byte[] value,
                       int offset,
                       int length)
Creates a byte array window that provides access to the bytes in the supplied array between the position starting at the supplied offset.

Parameters:
value - the underlying byte array.
offset - the starting position of the created window.
length - the length of the window.
Method Detail

getValue

public byte[] getValue()

setValue

public void setValue(byte[] value)

getOffset

public int getOffset()

set

public void set(int i,
                byte b)

get

public byte get(int i)

getLength

public int getLength()

equals

public boolean equals(java.lang.Object obj)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

equals

public boolean equals(ByteArrayWindow other,
                      int maxBytesToCompare)

Copyright 2005-2010 Frank Fock (SNMP4J.org)

Copyright © 2011 SNMP4J.org. All Rights Reserved.