@Test public void testParameterStatus() throws Exception { ParameterMessage message = decode(PARAMETER_CLIENT_ENCODING); Assert.assertEquals(message.getType(), BackendMessageType.PARAMETER_STATUS); Assert.assertEquals(message.getVariable(), ConfigurationVariable.CLIENT_ENCODING); Assert.assertEquals(message.getValue(), "UNICODE"); }
public AbstractBackendMessage decode(DecoderInputStream input, boolean block) throws IOException { if (!input.markSupported() && !block) { throw new IllegalArgumentException("Non-blocking decoding requires an InputStream that supports marking"); } input.mark(Integer.MAX_VALUE); AbstractBackendMessage message = null; try { message = doDecode(input, block); } finally { if (message == null) { input.reset(); } } return message; }
BackendMessageDecoder { public AbstractBackendMessage decode(DecoderInputStream input, boolean block) throws IOException { if (!input.markSupported() && !block) { throw new IllegalArgumentException("Non-blocking decoding requires an InputStream that supports marking"); } input.mark(Integer.MAX_VALUE); AbstractBackendMessage message = null; try { message = doDecode(input, block); } finally { if (message == null) { input.reset(); } } return message; } }
BackendMessageDecoder { public AbstractBackendMessage decode(DecoderInputStream input, boolean block) throws IOException { if (!input.markSupported() && !block) { throw new IllegalArgumentException("Non-blocking decoding requires an InputStream that supports marking"); } input.mark(Integer.MAX_VALUE); AbstractBackendMessage message = null; try { message = doDecode(input, block); } finally { if (message == null) { input.reset(); } } return message; } BackendMessageDecoder(ConnectionState connectionState); }
BackendMessageDecoder { public AbstractBackendMessage decode(DecoderInputStream input, boolean block) throws IOException { if (!input.markSupported() && !block) { throw new IllegalArgumentException("Non-blocking decoding requires an InputStream that supports marking"); } input.mark(Integer.MAX_VALUE); AbstractBackendMessage message = null; try { message = doDecode(input, block); } finally { if (message == null) { input.reset(); } } return message; } BackendMessageDecoder(ConnectionState connectionState); AbstractBackendMessage decode(DecoderInputStream input, boolean block); }
BackendMessageDecoder { public AbstractBackendMessage decode(DecoderInputStream input, boolean block) throws IOException { if (!input.markSupported() && !block) { throw new IllegalArgumentException("Non-blocking decoding requires an InputStream that supports marking"); } input.mark(Integer.MAX_VALUE); AbstractBackendMessage message = null; try { message = doDecode(input, block); } finally { if (message == null) { input.reset(); } } return message; } BackendMessageDecoder(ConnectionState connectionState); AbstractBackendMessage decode(DecoderInputStream input, boolean block);  }