|
SourceJammer 1.1.0 March 1, 2002 Copyright (c) 2001, 2002 Robert MacGrogan |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.sourcejammer.server.make.ByteArrayChunkCompare
This class allows simple iteration through a byte array for the purpose of comparing a chunk of bytes of a specified size.
Constructor Summary | |
ByteArrayChunkCompare(byte[] source)
Create a new ByteArrayChunkCompare object for a byte array, beginning with the first byte in the array. |
|
ByteArrayChunkCompare(byte[] source,
int iBeginIndex)
Create a new ByteArrayChunkCompare object for a byte array, beginning with a specified index. |
Method Summary | |
boolean |
equals(java.lang.Object o)
Tests if the current chunk of bytes in this ByteArrayChunkCompare object is equal to the current chunk of bytes in o . |
int |
getIndex()
|
int |
getSizeOfSource()
|
protected byte[] |
getSource()
|
boolean |
nextByByte()
Advances the index of the byte array source by 1 byte. |
boolean |
nextByChunk()
Advances the index of the byte array source to the next byte chunk. |
void |
setIndex(int index)
Explicitly sets the index value. |
int |
size()
Returns the comparison size, or the number of bytes that will be compared when the equals() method is called. |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ByteArrayChunkCompare(byte[] source) throws EndOfSourceException
source
- -- a byte array to be iterated through and compared.public ByteArrayChunkCompare(byte[] source, int iBeginIndex) throws EndOfSourceException
source
- -- a byte array to be iterated through and compared.iBeginIndex
- -- the index at which iteration through source should begin.
Note: index is 0-based. 0 is first, 1 is second, . . .Method Detail |
public boolean nextByChunk()
true
if the index advanced successfully. false
if the end of the source byte array has been reached.public boolean nextByByte()
true
if the index advanced successfully. false
if the end of the source byte array has been reached.public void setIndex(int index) throws EndOfSourceException
public int getIndex()
public int size()
equals()
method is called.public int getSizeOfSource()
public boolean equals(java.lang.Object o)
o
.protected byte[] getSource()
|
SourceJammer 1.1.0 March 1, 2002 Copyright (c) 2001, 2002 Robert MacGrogan |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |