Package org.jruby.util

Examples of org.jruby.util.ByteList.bytes()


                ByteList buf = new ByteList();
                int c;
                while ((c = in.read()) != -1) {
                    buf.append(c);
                }
                return buf.bytes();
            }
        });
    }

    private byte[] safeGetBytes(String s) {
View Full Code Here


                fail(ex.getMessage());
            }
        }
        assertActionShouldProduce(expected, new Callable<byte[]>() {
            public byte[] call() throws Exception {
                return actual.bytes();
            }
        });
    }
}
View Full Code Here

                Enumeration enm = ((ASN1Sequence)ee).getObjects();
                while (enm.hasMoreElements()) {
                    byte[] octets = ((ASN1OctetString)enm.nextElement()).getOctets();
                    combinedOctets.append(octets);
                }
                ec.setEncData(new DEROctetString(combinedOctets.bytes()));
            } else {
                ec.setEncData((ASN1OctetString)ee);
            }
        }
        return ec;
View Full Code Here

                addr.convertToString().toString(), port);
    }

    public static UnixSocketAddress addressFromSockaddr_un(ThreadContext context, IRubyObject arg) {
        ByteList bl = arg.convertToString().getByteList();
        byte[] raw = bl.bytes();

        int end = 2;
        for (; end < raw.length; end++) {
            if (raw[end] == 0) break;
        }
View Full Code Here

                ByteList buf = new ByteList();
                int c;
                while ((c = in.read()) != -1) {
                    buf.append(c);
                }
                return buf.bytes();
            }
        });
    }

    private byte[] safeGetBytes(String s) {
View Full Code Here

                fail(ex.getMessage());
            }
        }
        assertActionShouldProduce(expected, new Callable<byte[]>() {
            public byte[] call() throws Exception {
                return actual.bytes();
            }
        });
    }
}
View Full Code Here

        return iaddr;
    }

    public static UnixSocketAddress addressFromSockaddr_un(ThreadContext context, IRubyObject arg) {
        ByteList bl = arg.convertToString().getByteList();
        byte[] raw = bl.bytes();

        int end = 2;
        for (; end < raw.length; end++) {
            if (raw[end] == 0) break;
        }
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.