protected static String ignoreLeading0 ( String line ) { if ( line . length ( ) > 0 && line . charAt ( 0 ) == 0 ) { logger . debug ( "WARNING: The first character of the reply is 0. Ignoring the character." ) ; /* logger.debug( "\n\nWARNING:\n In the reply received from the server, the first character's code is 0! I will ignore it but this means the server is not following the protocol. Here's the details: \n first line of the reply ->" + line + "<-"); logger.debug( "First 3 chars of reply->" +line.substring(0,3)+"<-"); logger.debug( "char 0 ->" + line.charAt(0) + "<- code = " + (int)line.charAt(0)); logger.debug( "char 1 ->" + line.charAt(1) + "<- code = " + (int)line.charAt(1)); logger.debug( "char 2 ->" + line.charAt(2) + "<- code = " + (int)line.charAt(2)); logger.debug( "char 3 ->" + line.charAt(3) + "<- code = " + (int)line.charAt(3)); */ return line . substring ( 1 , line . length ( ) ) ; } return line ; }
GT2 . 0 wuftp server incorrectly inserts \ 0 between lines . We have to deal with that .