ostore.client
Class OSActionReplace

java.lang.Object
  |
  +--ostore.client.OSAction
        |
        +--ostore.client.OSActionReplace
All Implemented Interfaces:
QuickSerializable

public class OSActionReplace
extends OSAction

The OSActionReplace replaces data in a data object.

Version:
$Id: OSActionReplace.java,v 1.19 2003/11/17 23:52:43 emilong Exp $
Author:
Patrick R. Eaton

Field Summary
static boolean DEBUG
           
 
Constructor Summary
OSActionReplace(InputBuffer buffer)
           
OSActionReplace(SecureHash guid, int start, int length, byte[] data)
          Creates a new OSActionReplace.
 
Method Summary
 byte[] getData()
          Returns the data that this update replaces.
 int getLength()
          Returns the number of bytes that this update replaces.
 int getStart()
          Returns the offset at which to start replacing data.
 SecureHash getTargetAguid()
          Returns the Aguid of the object that this update modifies.
 void serialize(OutputBuffer buffer)
          Add the object to the buffer.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG
See Also:
Constant Field Values
Constructor Detail

OSActionReplace

public OSActionReplace(SecureHash guid,
                       int start,
                       int length,
                       byte[] data)
Creates a new OSActionReplace.

Parameters:
guid - the Aguid of the data object to modify
start - the offset at which to start replacing data
length - the number of bytes to replace
data - the data to replace. The data is assumed to start at offset zero.

OSActionReplace

public OSActionReplace(InputBuffer buffer)
                throws QSException
Method Detail

serialize

public void serialize(OutputBuffer buffer)
Description copied from interface: QuickSerializable
Add the object to the buffer.

Specified by:
serialize in interface QuickSerializable
Overrides:
serialize in class OSAction
Parameters:
buffer - the output buffer to add the object to

getTargetAguid

public SecureHash getTargetAguid()
Returns the Aguid of the object that this update modifies.

Specified by:
getTargetAguid in class OSAction
Returns:
the Aguid of the object that this update modifies

getStart

public int getStart()
Returns the offset at which to start replacing data.

Returns:
the offset at which to start replacing data

getLength

public int getLength()
Returns the number of bytes that this update replaces.

Returns:
the number of bytes that this update replaces

getData

public byte[] getData()
Returns the data that this update replaces.

Returns:
the number of bytes that this update replaces

toString

public String toString()
Specified by:
toString in class OSAction