public class PPCReader extends AbstractReader
File content is split, and the iterator returns the raw message content of each SWIFT message found in the file. API is also provided to read each message parsed into an MT.
The reader can be created from a String but also from a Reader, File or Stream; thus when used as an iterator you can iterate it just once, it is not re-entrant.
reader| Constructor and Description |
|---|
PPCReader(java.io.File file) |
PPCReader(java.io.File _file,
java.nio.charset.Charset _charset)
Constructs a PPCReader to read messages from a file using the specified charset.
|
PPCReader(java.io.InputStream stream) |
PPCReader(java.io.InputStream _stream,
java.nio.charset.Charset _charset)
Constructs a PPCReader to read messages from an input stream using the specified charset.
|
PPCReader(java.io.Reader r)
Constructs a PPCReader to read messages from a given Reader instance
|
PPCReader(java.lang.String string)
Constructs a PPCReader to read messages from a string
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext()
Returns true if the iterator has more messages
|
java.lang.String |
next()
Returns the next message in the iterator in its raw format
|
iterator, nextMT, nextSwiftMessagepublic PPCReader(java.io.Reader r)
public PPCReader(java.lang.String string)
public PPCReader(java.io.InputStream stream)
public PPCReader(java.io.InputStream _stream,
java.nio.charset.Charset _charset)
_stream - stream to read_charset - charsetpublic PPCReader(java.io.File file)
throws java.io.FileNotFoundException
java.io.FileNotFoundExceptionpublic PPCReader(java.io.File _file,
java.nio.charset.Charset _charset)
throws java.io.FileNotFoundException
_file - file to read_charset - charsetjava.io.FileNotFoundException - if file does not existpublic boolean hasNext()
hasNext in interface java.util.Iterator<java.lang.String>hasNext in class AbstractReaderpublic java.lang.String next()
next in interface java.util.Iterator<java.lang.String>next in class AbstractReader