Search in sources :

Example 6 with BASE1Header

use of org.jpos.iso.header.BASE1Header in project jPOS by jpos.

the class VAPChannel method sendMessageHeader.

/**
 * @param   m   the message
 * @param   len already packed message len (to avoid re-pack)
 * @exception IOException
 */
protected void sendMessageHeader(ISOMsg m, int len) throws IOException {
    ISOHeader h = !isOverrideHeader() && m.getHeader() != null ? m.getISOHeader() : new BASE1Header(srcid, dstid, headerFormat);
    if (h instanceof BASE1Header)
        ((BASE1Header) h).setLen(len);
    serverOut.write(h.pack());
}
Also used : BASE1Header(org.jpos.iso.header.BASE1Header)

Aggregations

BASE1Header (org.jpos.iso.header.BASE1Header)6 Test (org.junit.Test)4 ISO87BPackager (org.jpos.iso.packager.ISO87BPackager)2 ObjectOutputStream (java.io.ObjectOutputStream)1 ServerSocket (java.net.ServerSocket)1 ISOMsg (org.jpos.iso.ISOMsg)1