com.tapina.robe.runtime
Class ByteArray
java.lang.Object
com.tapina.robe.runtime.BinaryDataSource
com.tapina.robe.runtime.ByteArray
- public final class ByteArray
- extends BinaryDataSource
This class provides abstracted access to a virtual byte array.
The byte array in question will actually be a subset of an existing byte array.
Constructor Summary |
ByteArray(byte[] array,
int offset,
int length)
|
Method Summary |
long |
get5ByteValue(int offset)
|
byte[] |
getArray()
|
byte |
getByte(int offset)
|
ByteArray |
getByteArray(int offset,
int count,
boolean create)
Get an object which allows direct access to the underlying data block for the specified byte range. |
byte[] |
getBytes(int offset,
int count)
Take a copy of a set of bytes from the memory map. |
int |
getLength()
|
int |
getOffset()
|
java.awt.Point |
getPoint(int offset)
|
java.awt.Rectangle |
getRectangle(int offset)
|
int |
getWord(int offset)
|
int[] |
getWords(int offset,
int count)
|
void |
set(int offset,
byte b)
|
void |
setInt(int offset,
int i)
|
void |
setPoint(int offset,
java.awt.Point p)
|
void |
setRectangle(int offset,
java.awt.Rectangle r)
|
void |
setString0(int offset,
java.lang.String s)
|
void |
setString0(int offset,
java.lang.String s,
int length)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ByteArray
public ByteArray(byte[] array,
int offset,
int length)
getByte
public final byte getByte(int offset)
set
public final void set(int offset,
byte b)
getWord
public final int getWord(int offset)
setInt
public final void setInt(int offset,
int i)
setString0
public final void setString0(int offset,
java.lang.String s)
setString0
public void setString0(int offset,
java.lang.String s,
int length)
getRectangle
public final java.awt.Rectangle getRectangle(int offset)
setRectangle
public final void setRectangle(int offset,
java.awt.Rectangle r)
getPoint
public final java.awt.Point getPoint(int offset)
setPoint
public final void setPoint(int offset,
java.awt.Point p)
getLength
public final int getLength()
getArray
public byte[] getArray()
getOffset
public int getOffset()
getByteArray
public ByteArray getByteArray(int offset,
int count,
boolean create)
- Description copied from class:
BinaryDataSource
- Get an object which allows direct access to the underlying data block for the specified byte range.
- Specified by:
getByteArray
in class BinaryDataSource
- Parameters:
offset
- address for which to find bytescount
- size of byte block to allow access tocreate
-
- Returns:
- ByteArray which reads/writes through to underlying data block.
getBytes
public byte[] getBytes(int offset,
int count)
- Description copied from class:
BinaryDataSource
- Take a copy of a set of bytes from the memory map.
Use
BinaryDataSource.getByteArray(int,int,boolean)
instead for efficiency.
- Specified by:
getBytes
in class BinaryDataSource
- Parameters:
offset
- address at which to load bytescount
- number of bytes to load
- Returns:
- array containing bytes loaded from specified address
get5ByteValue
public long get5ByteValue(int offset)
- Specified by:
get5ByteValue
in class BinaryDataSource
getWords
public int[] getWords(int offset,
int count)
- Specified by:
getWords
in class BinaryDataSource
Copyright © 2003-2005 . All Rights Reserved.