net.sf.xbus.technical.as400
Class AS400ByteArrayListReceiver

java.lang.Object
  extended by net.sf.xbus.technical.as400.AS400FileBase
      extended by net.sf.xbus.technical.as400.AS400FileReceiver
          extended by net.sf.xbus.technical.as400.AS400ByteArrayListReceiver
All Implemented Interfaces:
TAResource, Receiver, ReceiverSingleInterface

public class AS400ByteArrayListReceiver
extends AS400FileReceiver
implements Receiver, ReceiverSingleInterface

AS400ByteArrayListReceiver serves for reading files from an AS400 and putting the file content into a byte array list. Each byte array in this list corresponds to a record in the file. Byte array are used instead of strings if the character encoding does not allow predicting the the string length of free text fields in sense of number of characters by knowing the number of bytes. In this case bytes instaed of characters have to be counted to determine the contents of single record fileds.

Author:
Stefan Fleckenstein

Field Summary
 
Fields inherited from class net.sf.xbus.technical.as400.AS400FileReceiver
mAS400System, mEncoding, mOriginFile, mQSYSObject
 
Fields inherited from class net.sf.xbus.technical.as400.AS400FileBase
mConverter
 
Constructor Summary
AS400ByteArrayListReceiver()
           
 
Method Summary
protected  java.lang.Object getRequestContent()
          Reads the integrated file system object specified by the path name into a ByteArrayList.
 java.lang.String getType()
          A Receiver can receive data either as a String or as an Object from a neighboring system.
 
Methods inherited from class net.sf.xbus.technical.as400.AS400FileReceiver
close, commit, doReceive, getOnError, getResolution, open, readConfiguration, receive, rollback, setAS400System
 
Methods inherited from class net.sf.xbus.technical.as400.AS400FileBase
callAS400Program, copyFile, deleteFile, deleteMember, getEncoding, getRenamedMember, releaseLock, renameFile, setLock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.xbus.technical.ReceiverSingleInterface
receive
 

Constructor Detail

AS400ByteArrayListReceiver

public AS400ByteArrayListReceiver()
Method Detail

getRequestContent

protected java.lang.Object getRequestContent()
                                      throws XException
Reads the integrated file system object specified by the path name into a ByteArrayList.

Note: We use the record-level access classes for reading.
Contents of each record are read into a byte array of AS400 data.

Overrides:
getRequestContent in class AS400FileReceiver
Returns:
file contents as ByteArrayList.
Throws:
XException - if file can not be read or any I/O error occurs

getType

public java.lang.String getType()
Description copied from interface: Receiver
A Receiver can receive data either as a String or as an Object from a neighboring system.

Specified by:
getType in interface Receiver
Overrides:
getType in class AS400FileReceiver