|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.legstar.coxb.transform.AbstractTransformer com.legstar.coxb.transform.AbstractHostToJavaTransformer
public abstract class AbstractHostToJavaTransformer
Generic methods to transform host data to java.
Implementing classes should inherit from AbstractHostToJavaTransformer and implement the getBinding method. This is sample code with dynamic binding:public class HostToJavaLsfileaeTransformer extends AbstractHostToJavaTransformer { public ICobolComplexBinding getBinding() throws BindingException { try { CComplexReflectBinding binding = new CComplexReflectBinding( new com.legstar.test.coxb.lsfileae.ObjectFactory(), com.legstar.test.coxb.lsfileae.Dfhcommarea.class); return binding; } catch (ReflectBindingException e) { throw new BindingException(e); } } }This is sample code with static binding:
public class HostToJavaLsfileaeTransformer extends AbstractHostToJavaTransformer { public ICobolComplexBinding getBinding() throws BindingException { return new com.legstar.test.coxb.lsfileae.DfhcommareaBinding(); } }
Constructor Summary | |
---|---|
AbstractHostToJavaTransformer()
Create a Host to Java transformer using default COBOL parameters. |
|
AbstractHostToJavaTransformer(CobolContext cobolContext)
Create a Host to Java transformer using a specific COBOL parameters set. |
|
AbstractHostToJavaTransformer(String hostCharset)
Create a Host to Java transformer using a specific host character set while other COBOL parameters are set by default. |
Method Summary | ||
---|---|---|
|
transform(byte[] hostData)
Transforms host data to java data object. |
|
|
transform(byte[] hostData,
HostTransformStatus status)
Transforms host data to java data object. |
|
|
transform(byte[] hostData,
int offset)
Transforms host data to java data object. |
|
|
transform(byte[] hostData,
int offset,
HostTransformStatus status)
Transforms host data to java data object. |
|
|
transform(byte[] hostData,
int offset,
String hostCharset)
Transforms host data to java data object with a specific host character set. |
|
|
transform(byte[] hostData,
int offset,
String hostCharset,
HostTransformStatus status)
Transforms host data to java data object with a specific host character set. |
|
|
transform(byte[] hostData,
String hostCharset)
Transforms host data to java data object with a specific host character set. |
|
|
transform(byte[] hostData,
String hostCharset,
HostTransformStatus status)
Transforms host data to java data object with a specific host character set. |
Methods inherited from class com.legstar.coxb.transform.AbstractTransformer |
---|
getBinding, getByteLength, getCachedBinding, getCobolBindingVisitorsFactory, getCobolContext, getCobolConverters, newBinding, setCobolBindingVisitorsFactory, setCobolContext, setCobolConverters |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.legstar.coxb.transform.IHostTransformer |
---|
getBinding, getByteLength, getCobolBindingVisitorsFactory, getCobolContext, getCobolConverters, newBinding, setCobolBindingVisitorsFactory, setCobolContext, setCobolConverters |
Constructor Detail |
---|
public AbstractHostToJavaTransformer()
public AbstractHostToJavaTransformer(String hostCharset)
hostCharset
- the host character setpublic AbstractHostToJavaTransformer(CobolContext cobolContext)
cobolContext
- the COBOL parameters set.Method Detail |
---|
public <T> T transform(byte[] hostData) throws HostTransformException
transform
in interface IHostToJavaTransformer
T
- the bound object typehostData
- a byte array containing host data
HostTransformException
- if transformation failspublic <T> T transform(byte[] hostData, int offset) throws HostTransformException
transform
in interface IHostToJavaTransformer
T
- the bound object typehostData
- a byte array containing host dataoffset
- index of first byte to process in hostData
HostTransformException
- if transformation failspublic <T> T transform(byte[] hostData, String hostCharset) throws HostTransformException
transform
in interface IHostToJavaTransformer
T
- the bound object typehostData
- a byte array containing host datahostCharset
- the host character set
HostTransformException
- if transformation failspublic <T> T transform(byte[] hostData, int offset, String hostCharset) throws HostTransformException
transform
in interface IHostToJavaTransformer
T
- the bound object typehostData
- a byte array containing host dataoffset
- index of first byte to process in hostDatahostCharset
- the host character set
HostTransformException
- if transformation failspublic <T> T transform(byte[] hostData, String hostCharset, HostTransformStatus status) throws HostTransformException
transform
in interface IHostToJavaTransformer
T
- the bound object typehostData
- a byte array containing host datahostCharset
- the host character setstatus
- will contain information on the transformation after it is
executed
HostTransformException
- if transformation failspublic <T> T transform(byte[] hostData, int offset, String hostCharset, HostTransformStatus status) throws HostTransformException
transform
in interface IHostToJavaTransformer
T
- the bound object typehostData
- a byte array containing host dataoffset
- index of first byte to process in hostDatahostCharset
- the host character setstatus
- will contain information on the transformation after it is
executed
HostTransformException
- if transformation failspublic <T> T transform(byte[] hostData, HostTransformStatus status) throws HostTransformException
transform
in interface IHostToJavaTransformer
T
- the bound object typehostData
- a byte array containing host datastatus
- will contain information on the transformation after it is
executed
HostTransformException
- if transformation failspublic <T> T transform(byte[] hostData, int offset, HostTransformStatus status) throws HostTransformException
transform
in interface IHostToJavaTransformer
T
- the bound object typehostData
- a byte array containing host dataoffset
- index of first byte to process in hostDatastatus
- will contain information on the transformation after it is
executed
HostTransformException
- if transformation fails
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |