org.marre.sms.transport.pswincom
Class PsWinXmlCleanupReader

java.lang.Object
  extended byjava.io.Reader
      extended byjava.io.FilterReader
          extended byorg.marre.sms.transport.pswincom.PsWinXmlCleanupReader

public class PsWinXmlCleanupReader
extends java.io.FilterReader

Cleans up the xml received from pswin. The response contains a null character in the end. This character is not valid in xml so we have to remove that char before the data is sent to the xml parser.

Version:
$Id: PsWinXmlCleanupReader.java,v 1.2 2005/11/26 16:12:10 c95men Exp $
Author:
Markus

Field Summary
 
Fields inherited from class java.io.FilterReader
in
 
Fields inherited from class java.io.Reader
lock
 
Constructor Summary
protected PsWinXmlCleanupReader(java.io.Reader reader)
          Creates this filter.
 
Method Summary
 int read(char[] cbuf, int off, int len)
          Reads bytes but removes the terminating null.
 
Methods inherited from class java.io.FilterReader
close, mark, markSupported, read, ready, reset, skip
 
Methods inherited from class java.io.Reader
read
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PsWinXmlCleanupReader

protected PsWinXmlCleanupReader(java.io.Reader reader)
Creates this filter.

Parameters:
reader - Reader to filter
Method Detail

read

public int read(char[] cbuf,
                int off,
                int len)
         throws java.io.IOException
Reads bytes but removes the terminating null.

Parameters:
cbuf -
off -
len -
Returns:
bytes read or -1 if eof
Throws:
java.io.IOException


Copyright © 2002-2005 Markus Eriksson. All Rights Reserved.