@Override
    public void write(OutputStream os, String s)  throws IOException{
        os.write(intToByteArray(s.length()/2,lengthPrefixLen));
        if(log.isDebugEnabled()) {
            log.debug("Wrote: " + s.length()/2 + " bytes");
        }
        this.tcpClient.write(os, s);
    }
@Test
    public void testError() throws Exception {
        ByteArrayOutputStream os = null;
        ByteArrayInputStream is = null;
        LengthPrefixedBinaryTCPClientImpl lp = new LengthPrefixedBinaryTCPClientImpl();
        try {
            lp.write(os, is);
            fail("Expected java.lang.UnsupportedOperationException");
        } catch (java.lang.UnsupportedOperationException expected) {
        }
    }