@Test public void testGetMessageLengthThrowsNullPointerException() throws Throwable { PostChannel postChannel = new PostChannel(); try { postChannel.getMessageLength(); fail("Expected NullPointerException to be thrown"); } catch (NullPointerException ex) { if (isJavaVersionAtMost(JAVA_14)) { assertNull(ex.getMessage(), "ex.getMessage()"); } else { assertEquals("Cannot invoke \"java.io.DataInputStream.readFully(byte[], int, int)\" because \"this.serverIn\" is null", ex.getMessage(), "ex.getMessage()"); } } }
protected int getMessageLength() throws IOException, ISOException { byte[] b = new byte[2]; serverIn.readFully(b,0,2); return ((int)b[0] &0xFF) << 8 | (int)b[1] &0xFF; }
PostChannel extends BaseChannel { protected int getMessageLength() throws IOException, ISOException { byte[] b = new byte[2]; serverIn.readFully(b,0,2); return ((int)b[0] &0xFF) << 8 | (int)b[1] &0xFF; } }
PostChannel extends BaseChannel { protected int getMessageLength() throws IOException, ISOException { byte[] b = new byte[2]; serverIn.readFully(b,0,2); return ((int)b[0] &0xFF) << 8 | (int)b[1] &0xFF; } PostChannel();  PostChannel(String host, int port, ISOPackager p);  PostChannel(ISOPackager p);  PostChannel(ISOPackager p, ServerSocket serverSocket); }
PostChannel extends BaseChannel { protected int getMessageLength() throws IOException, ISOException { byte[] b = new byte[2]; serverIn.readFully(b,0,2); return ((int)b[0] &0xFF) << 8 | (int)b[1] &0xFF; } PostChannel();  PostChannel(String host, int port, ISOPackager p);  PostChannel(ISOPackager p);  PostChannel(ISOPackager p, ServerSocket serverSocket); void setHeader(String header); }
PostChannel extends BaseChannel { protected int getMessageLength() throws IOException, ISOException { byte[] b = new byte[2]; serverIn.readFully(b,0,2); return ((int)b[0] &0xFF) << 8 | (int)b[1] &0xFF; } PostChannel();  PostChannel(String host, int port, ISOPackager p);  PostChannel(ISOPackager p);  PostChannel(ISOPackager p, ServerSocket serverSocket); void setHeader(String header);  }