@Test public void testSendMessageLengthThrowsNullPointerException() throws Throwable { byte[] TPDU = new byte[0]; NCCChannel nCCChannel = new NCCChannel(new ISO87APackager(), TPDU); try { nCCChannel.sendMessageLength(100); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cannot invoke \"java.io.DataOutputStream.write(byte[])\" because \"this.serverOut\" is null", ex.getMessage(), "ex.getMessage()"); } } }
protected void sendMessageLength(int len) throws IOException { try { serverOut.write ( ISOUtil.str2bcd ( ISOUtil.zeropad (Integer.toString (len % 10000), 4), true ) ); } catch (ISOException e) { Logger.log (new LogEvent (this, "send-message-length", e)); } }
NCCChannel extends BaseChannel { protected void sendMessageLength(int len) throws IOException { try { serverOut.write ( ISOUtil.str2bcd ( ISOUtil.zeropad (Integer.toString (len % 10000), 4), true ) ); } catch (ISOException e) { Logger.log (new LogEvent (this, "send-message-length", e)); } } }
NCCChannel extends BaseChannel { protected void sendMessageLength(int len) throws IOException { try { serverOut.write ( ISOUtil.str2bcd ( ISOUtil.zeropad (Integer.toString (len % 10000), 4), true ) ); } catch (ISOException e) { Logger.log (new LogEvent (this, "send-message-length", e)); } } NCCChannel();  NCCChannel(String host, int port, ISOPackager p, byte[] TPDU);  NCCChannel(ISOPackager p, byte[] TPDU);  NCCChannel(ISOPackager p, byte[] TPDU, ServerSocket serverSocket); }
NCCChannel extends BaseChannel { protected void sendMessageLength(int len) throws IOException { try { serverOut.write ( ISOUtil.str2bcd ( ISOUtil.zeropad (Integer.toString (len % 10000), 4), true ) ); } catch (ISOException e) { Logger.log (new LogEvent (this, "send-message-length", e)); } } NCCChannel();  NCCChannel(String host, int port, ISOPackager p, byte[] TPDU);  NCCChannel(ISOPackager p, byte[] TPDU);  NCCChannel(ISOPackager p, byte[] TPDU, ServerSocket serverSocket); void setHeader(String header); void setConfiguration(Configuration cfg); }
NCCChannel extends BaseChannel { protected void sendMessageLength(int len) throws IOException { try { serverOut.write ( ISOUtil.str2bcd ( ISOUtil.zeropad (Integer.toString (len % 10000), 4), true ) ); } catch (ISOException e) { Logger.log (new LogEvent (this, "send-message-length", e)); } } NCCChannel();  NCCChannel(String host, int port, ISOPackager p, byte[] TPDU);  NCCChannel(ISOPackager p, byte[] TPDU);  NCCChannel(ISOPackager p, byte[] TPDU, ServerSocket serverSocket); void setHeader(String header); void setConfiguration(Configuration cfg);  }