Share this page

# LrJposChannel.isOverrideHeader

Gets the overrideHeader property for the channel.

`public static boolean isOverrideHeader()`

## Return values

This function returns the value of the overrideHeader property.

## General information

If the LrJposChannel.setOverrideHeader property is set to true, the defined channel header overrides the message header. If not, the channel header is not used.

## Example

Copy code

    public void simpleISOtest() throws Throwable{

            GenericPackager packager = new GenericPackager(PACKAGERCONFIGFILE);
            LrJposChannel.initChannel(LrJposChannel.ChannelType.ASCIIChannel, "localhost", 8000, packager);
            LrJposChannel.setHeader("newHeader");
            if (LrJposChannel.isOverrideHeader()) {
                LrJposChannel.setOverrideHeader(true);
            }

            LrJposChannel.connect();

            LrISOMsg m = new LrISOMsg();
            m.setMTI("0100");
            m.set(ISO87Fields.PAN_PRIMARY_ACCOUNT_NUMBER, "1234567890000000000");
            m.set(3, "523456");
            m.set(4, "123456789121");
            m.set(12, "20241605108110");
            m.set(47, "32432");

            LrJposChannel.send(m);

            LrISOMsg r = LrJposChannel.receive();
            if (r!=null) {
                lr.output_message(r.getMTI());
            }

            byte[] currentHeader = LrJposChannel.getHeader();

            LrJposChannel.disconnect();
            LrJposChannel.closeChannel();
    }

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: