Examples of ByteInputStream


Examples of com.sun.xml.messaging.saaj.util.ByteInputStream

        InputStream is = request.getInputStream();
       
        byte[] bytes = readFully(is);
        int length = request.getContentLength() == -1 ? bytes.length
            : request.getContentLength();
        ByteInputStream in = new ByteInputStream(bytes, length);

        SOAPMessageContext msgContext = rpcFactory.createSOAPMessageContext();
        SOAPMessage message = msgContext.createMessage(headers, in);

        return message;
View Full Code Here

Examples of com.sun.xml.messaging.saaj.util.ByteInputStream

        InputStream is = request.getInputStream();
       
        byte[] bytes = readFully(is);
        int length = request.getContentLength() == -1 ? bytes.length
            : request.getContentLength();
        ByteInputStream in = new ByteInputStream(bytes, length);

        SOAPMessageContext msgContext = rpcFactory.createSOAPMessageContext();
        SOAPMessage message = msgContext.createMessage(headers, in);

        return message;
View Full Code Here

Examples of com.sun.xml.messaging.saaj.util.ByteInputStream

        InputStream is = request.getInputStream();
       
        byte[] bytes = readFully(is);
        int length = request.getContentLength() == -1 ? bytes.length
            : request.getContentLength();
        ByteInputStream in = new ByteInputStream(bytes, length);

        SOAPMessageContext msgContext = rpcFactory.createSOAPMessageContext();
        SOAPMessage message = msgContext.createMessage(headers, in);

        return message;
View Full Code Here

Examples of com.sun.xml.messaging.saaj.util.ByteInputStream

        InputStream is = request.getInputStream();
       
        byte[] bytes = readFully(is);
        int length = request.getContentLength() == -1 ? bytes.length
            : request.getContentLength();
        ByteInputStream in = new ByteInputStream(bytes, length);

        SOAPMessageContext msgContext = rpcFactory.createSOAPMessageContext();
        SOAPMessage message = msgContext.createMessage(headers, in);

        return message;
View Full Code Here

Examples of com.sun.xml.messaging.saaj.util.ByteInputStream

        InputStream is = request.getInputStream();
       
        byte[] bytes = readFully(is);
        int length = request.getContentLength() == -1 ? bytes.length
            : request.getContentLength();
        ByteInputStream in = new ByteInputStream(bytes, length);

        SOAPMessageContext msgContext = rpcFactory.createSOAPMessageContext();
        SOAPMessage message = msgContext.createMessage(headers, in);

        return message;
View Full Code Here

Examples of net.yura.lobby.util.ByteInputStream

    @Test
    public void testRead() {
        System.out.println("testRead");

        ByteInputStream in = new ByteInputStream();
       
        in.addBytes(new byte[]{43,19});
        in.addBytes(new byte[]{12,15,22});
        in.addBytes(new byte[]{41,11});
       
        assertEquals(7, in.available()); assertEquals(43, in.read());
        assertEquals(6, in.available()); assertEquals(19, in.read());
        assertEquals(5, in.available()); assertEquals(12, in.read());
        assertEquals(4, in.available()); assertEquals(15, in.read());
        assertEquals(3, in.available()); assertEquals(22, in.read());
        assertEquals(2, in.available()); assertEquals(41, in.read());
        assertEquals(1, in.available()); assertEquals(11, in.read());
        assertEquals(0, in.available()); assertEquals(-1, in.read());

    }
View Full Code Here

Examples of net.yura.lobby.util.ByteInputStream

   
    @Test
    public void testSkip() {
        System.out.println("testSkip");
       
        ByteInputStream in = new ByteInputStream();
       
        in.addBytes(new byte[]{43,19});
        in.addBytes(new byte[]{12,15,22});
        in.addBytes(new byte[]{41,11});
       
        assertEquals(7, in.available()); assertEquals(1, in.skip(1));
        assertEquals(6, in.available()); assertEquals(1, in.skip(1));
        assertEquals(5, in.available()); assertEquals(1, in.skip(1));
        assertEquals(4, in.available()); assertEquals(1, in.skip(1));
        assertEquals(3, in.available()); assertEquals(1, in.skip(1));
        assertEquals(2, in.available()); assertEquals(1, in.skip(1));
        assertEquals(1, in.available()); assertEquals(1, in.skip(1));
        assertEquals(0, in.available()); assertEquals(0, in.skip(1));

        in.addBytes(new byte[]{43,19});
       
        assertEquals(2, in.available()); assertEquals(43, in.read());
        assertEquals(1, in.available()); assertEquals(19, in.read());
        assertEquals(0, in.available()); assertEquals(-1, in.read());
       
        in.addBytes(new byte[]{43,19});
        in.addBytes(new byte[]{12,15,22});
        in.addBytes(new byte[]{41,11});
       
        assertEquals(7, in.available()); assertEquals(43, in.read());
        assertEquals(6, in.available()); assertEquals(5, in.skip(5));
        assertEquals(1, in.available()); assertEquals(11, in.read());
        assertEquals(0, in.available()); assertEquals(-1, in.read());
       
    }
View Full Code Here

Examples of org.nutz.lang.util.ByteInputStream

           
            Connection conn = dataSource.getConnection();
           
            PreparedStatement stmt = conn.prepareStatement(sql);
           
            stmt.setBinaryStream(1, new ByteInputStream(new byte[0]));
            stmt.setString(2, buf.toString());
            stmt.setTime(3, new Time(currentMillis));
            stmt.setBigDecimal(4, new BigDecimal("56789.123"));
            stmt.setRowId(5, new MockRowId());
           
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.