net.wimpi.modbus.io
Interface Transportable

All Known Subinterfaces:
ModbusMessage
All Known Implementing Classes:
ExceptionResponse, IllegalFunctionRequest, ModbusMessageImpl, ModbusRequest, ModbusResponse, ReadCoilsRequest, ReadCoilsResponse, ReadInputDiscretesRequest, ReadInputDiscretesResponse, ReadInputRegistersRequest, ReadInputRegistersResponse, ReadMultipleRegistersRequest, ReadMultipleRegistersResponse, WriteCoilRequest, WriteCoilResponse, WriteMultipleCoilsRequest, WriteMultipleCoilsResponse, WriteMultipleRegistersRequest, WriteMultipleRegistersResponse, WriteSingleRegisterRequest, WriteSingleRegisterResponse

public interface Transportable

Interface defining a transportable class.

Version:
@version@ (@date@)
Author:
Dieter Wimberger

Method Summary
 int getOutputLength()
          Returns the number of bytes that will be written by writeTo(DataOutput).
 void readFrom(DataInput din)
          Reads this Transportable from the given DataInput.
 void writeTo(DataOutput dout)
          Writes this Transportable to the given DataOutput.
 

Method Detail

getOutputLength

int getOutputLength()
Returns the number of bytes that will be written by writeTo(DataOutput).

Returns:
the number of bytes that will be written as int.

writeTo

void writeTo(DataOutput dout)
             throws IOException
Writes this Transportable to the given DataOutput.

Parameters:
dout - the DataOutput to write to.
Throws:
IOException - if an I/O error occurs.

readFrom

void readFrom(DataInput din)
              throws IOException
Reads this Transportable from the given DataInput.

Parameters:
din - the DataInput to read from.
Throws:
IOException - if an I/O error occurs or the data is invalid.


Copyright © 2010. All Rights Reserved.