on 02-05-2013 8:04 PM
Hi,
I hava this code
public void execute(InputStream arg0, OutputStream arg1)
throws StreamTransformationException {
String line = null;
BufferedReader br = new BufferedReader(new InputStreamReader(arg0));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(arg1));
// Get reference to mapping trace
trace = (AbstractTrace)map.get(StreamTransformationConstants.MAPPING_TRACE);
trace.addInfo("Proccesing...");
try {
StringBuffer buffer = new StringBuffer();
while ((line = br.readLine()) != null) {
buffer.append(line);
}
String sourcexml=buffer.toString();
sourcexml.replaceAll("1024","9999");
bw.write(sourcexml);
trace.addInfo(sourcexml);
bw.flush();
br.close();
bw.close();
} catch (IOException ioe) {
trace.addWarning("Could not process source message");
throw new RuntimeException(ioe.getMessage());
}
trace.addInfo("Proccesed");
}
It works... but I need to change data.
Anybody know how to write or change output?
Thanks!
Solved.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hellow Cerbero,
Elaborate your question please.
Regards,
Sunil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sunil?
Elaborate?
Dont you see?
Title:
Question: "Anybody know how to write or change output?"
Regards.
Oops.! I have missed your last texts.
Check out the last code on this page..How to write console output
Also cross check with.. JAVA Mapping
Its not an exact one what u expect, but hope it helps.!
Regards,
Sunil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.