org.zmpp.base
Interface MemoryReadAccess

All Known Subinterfaces:
MemoryAccess
All Known Implementing Classes:
DefaultMemoryAccess, MemorySection

public interface MemoryReadAccess

This interface defines an abstract read access to a region of memory.

Version:
1.0
Author:
Wei-ju Wu

Method Summary
 byte readByte(int address)
          Returns the signed 8 bit value at specified address.
 short readShort(int address)
          Returns the signed 16 bit word at the specified address.
 long readUnsigned32(int address)
          Reads the unsigned 32 bit word at the specified address.
 short readUnsignedByte(int address)
          Returns the unsigned 8 bit value at the specified address.
 int readUnsignedShort(int address)
          Reads the unsigned 16 bit word at the specified address.
 

Method Detail

readUnsigned32

long readUnsigned32(int address)
Reads the unsigned 32 bit word at the specified address.

Parameters:
address - the address
Returns:
the 32 bit unsigned value as long

readUnsignedShort

int readUnsignedShort(int address)
Reads the unsigned 16 bit word at the specified address.

Parameters:
address - the address
Returns:
the 16 bit unsigned value as int

readShort

short readShort(int address)
Returns the signed 16 bit word at the specified address.

Parameters:
address - the address
Returns:
the 16 bit signed value

readUnsignedByte

short readUnsignedByte(int address)
Returns the unsigned 8 bit value at the specified address.

Parameters:
address - the address
Returns:
the 8 bit unsigned value

readByte

byte readByte(int address)
Returns the signed 8 bit value at specified address.

Parameters:
address - the byte address
Returns:
the 8 bit signed value


Copyright © 2005 . All Rights Reserved.