public class SwiftWriter extends Object
This class handles writing swift messages exclusively, all validation and consistency checks must be done previous to using the writer.
Constructor and Description |
---|
SwiftWriter() |
Modifier and Type | Method and Description |
---|---|
static String |
getInternalXml(SwiftMessage msg)
Get a string with the internal xml representation of a message.
|
static String |
writeBlock1(SwiftBlock1 b1)
Returns the given block content in its native SWIFT format
|
static void |
writeBlock1(SwiftBlock1 b1,
Writer writer)
Write the given block to writer in its native SWIFT format
|
static String |
writeBlock2(SwiftBlock2 b2)
Returns the given block content in its native SWIFT format
|
static void |
writeBlock2(SwiftBlock2 b2,
Writer writer)
Write the given block to writer in its native SWIFT format
|
static String |
writeBlock3(SwiftBlock3 b3)
Returns the given block content in its native SWIFT format
|
static void |
writeBlock3(SwiftBlock3 b3,
Writer writer)
Write the given block to writer in its native SWIFT format
|
static String |
writeBlock4(SwiftBlock4 b4)
Returns the given block content in its native SWIFT format
|
static void |
writeBlock4(SwiftBlock4 b4,
Writer writer)
Write the given block to writer in its native SWIFT format
|
static String |
writeBlock5(SwiftBlock5 b5)
Returns the given block content in its native SWIFT format
|
static void |
writeBlock5(SwiftBlock5 b5,
Writer writer)
Write the given block to writer in its native SWIFT format
|
static void |
writeMessage(SwiftMessage msg,
Writer writer)
Write the given message to writer in its native SWIFT format
|
public static void writeMessage(SwiftMessage msg, Writer writer)
msg
- the message to writewriter
- the writer that will actually receive all the write operationsIllegalArgumentException
- if msg or writer are null
public static String getInternalXml(SwiftMessage msg)
msg
- the message to writeIllegalArgumentException
- if msg is null
public static void writeBlock1(SwiftBlock1 b1, Writer writer)
b1
- a not null block 1writer
- public static String writeBlock1(SwiftBlock1 b1)
b1
- a not null block 1public static void writeBlock2(SwiftBlock2 b2, Writer writer)
b2
- a not null block 2writer
- public static String writeBlock2(SwiftBlock2 b2)
b2
- a not null block 2public static void writeBlock3(SwiftBlock3 b3, Writer writer)
b3
- a not null block 3writer
- public static String writeBlock3(SwiftBlock3 b3)
b3
- a not null block 3public static void writeBlock4(SwiftBlock4 b4, Writer writer)
b4
- a not null block 4writer
- public static String writeBlock4(SwiftBlock4 b4)
b4
- a not null block 4public static void writeBlock5(SwiftBlock5 b5, Writer writer)
b5
- a not null block 5writer
- public static String writeBlock5(SwiftBlock5 b5)
b5
- a not null block 5