Fix MQMessage character set handling,
Fix character set error handling.
This commit is contained in:
parent
c4d5a98daa
commit
5904264927
57
MQSSave.java
57
MQSSave.java
@ -1,7 +1,7 @@
|
||||
// $RCSfile: MQSSave.java,v $
|
||||
// $Revision: 1.19 $
|
||||
// $Revision: 1.20 $
|
||||
// $Name: $
|
||||
// $Date: 2008/12/18 17:25:42 $
|
||||
// $Date: 2009/01/05 17:32:49 $
|
||||
// $Author: agibert $
|
||||
|
||||
/*
|
||||
@ -35,9 +35,9 @@ import java.text.*;
|
||||
|
||||
public class MQSSave
|
||||
{
|
||||
private String MQSSave_Revision = "$Revision: 1.19 $";
|
||||
private String MQSSave_Revision = "$Revision: 1.20 $";
|
||||
private String MQSSave_Tag = "$Name: $";
|
||||
private String MQSSave_Date = "$Date: 2008/12/18 17:25:42 $";
|
||||
private String MQSSave_Date = "$Date: 2009/01/05 17:32:49 $";
|
||||
private String MQSSave_Author = "$Author: agibert $";
|
||||
private MQQueueManager QMng = null;
|
||||
private String QMng_Name = "";
|
||||
@ -594,8 +594,6 @@ public class MQSSave
|
||||
{
|
||||
if( CC_Error)
|
||||
{
|
||||
CC_Error = false;
|
||||
|
||||
Counter_Print( "*");
|
||||
Msg_Error_Nb++;
|
||||
|
||||
@ -628,37 +626,50 @@ public class MQSSave
|
||||
try
|
||||
{
|
||||
// input_msg.format = MQC.MQFMT_STRING;
|
||||
input_msg.characterSet = Character_Set;
|
||||
|
||||
/* Loop while Msg_Count not reatch */
|
||||
while( Msg_Get( input_msg, msg_id, Msg_Skip, Msg_Count, get_first))
|
||||
{
|
||||
get_first = false;
|
||||
|
||||
if( msg_id >= Msg_Skip)
|
||||
if( CC_Error == false)
|
||||
{
|
||||
/* This message is not skiped */
|
||||
/* This message is not in error */
|
||||
|
||||
if( Msg_Saved_Nb > 1)
|
||||
if( msg_id >= Msg_Skip)
|
||||
{
|
||||
Output_File.write( Message_Break.getBytes());
|
||||
}
|
||||
/* This message is not skiped */
|
||||
|
||||
buffer = new byte[ input_msg.getMessageLength()];
|
||||
input_msg.readFully( buffer);
|
||||
if( Msg_Saved_Nb > 1)
|
||||
{
|
||||
Output_File.write( Message_Break.getBytes());
|
||||
}
|
||||
|
||||
buffer = new byte[ input_msg.getMessageLength()];
|
||||
input_msg.readFully( buffer);
|
||||
|
||||
if( Trim_Mode)
|
||||
{
|
||||
String buffer_string = new String( buffer).trim();
|
||||
buffer = buffer_string.getBytes();
|
||||
}
|
||||
|
||||
Output_File.write( buffer, 0, buffer.length);
|
||||
if( Trim_Mode)
|
||||
{
|
||||
String buffer_string = new String( buffer).trim();
|
||||
buffer = buffer_string.getBytes();
|
||||
}
|
||||
|
||||
Output_File.write( buffer, 0, buffer.length);
|
||||
|
||||
if( Copy_Mode == false )
|
||||
{
|
||||
MQSDelete_Msg( input_msg);
|
||||
if( Copy_Mode == false )
|
||||
{
|
||||
MQSDelete_Msg( input_msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* This message is in error */
|
||||
|
||||
CC_Error = false;
|
||||
}
|
||||
|
||||
|
||||
msg_id++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user