Examples of toByteArray()

Examples of org.bson.io.OutputBuffer.toByteArray()

            Object id = dbo.get("_id");
            DBEncoder encoder = factory.create();
            OutputBuffer buffer = new BasicOutputBuffer();
            encoder.writeObject(buffer, dbo);
            return buffer.toByteArray();

        private void _checkKeys(DBObject o) {
            for (String s : o.keySet()) {
View Full Code Here

Examples of org.bson.types.ObjectId.toByteArray()


    public void testBytes(){
        ObjectId a = new ObjectId();
        assertEquals( a , new ObjectId( a.toByteArray() ) );
        byte b[] = new byte[12];
        java.util.Random r = new java.util.Random( 17 );
        for ( int i=0; i<b.length; i++ )
            b[i] = (byte)(r.nextInt());
View Full Code Here

Examples of org.codehaus.activemq.util.FastOutputStream.toByteArray()

            FastOutputStream buffer = new FastOutputStream();
            DataOutputStream out = new DataOutputStream(buffer);
            out.writeUTF((String) value);
            return buffer.toByteArray();

        public void fromBytes(byte[] data) throws IOException {
            DataInputStream in = new DataInputStream(new FastInputStream(data));
            this.previousKey = wrapLong(in.readLong());
View Full Code Here

Examples of org.codehaus.commons.compiler.jdk.ByteArrayJavaFileManager.ByteArrayJavaFileObject.toByteArray()

    if (!(classFileObject instanceof ByteArrayJavaFileObject))
      throw new UnsupportedOperationException("Only supports byte array based java file objects.");

    ByteArrayJavaFileObject bajfo = (ByteArrayJavaFileObject) classFileObject;
    return bajfo.toByteArray();


  private class DiagListener implements DiagnosticListener<JavaFileObject> {
View Full Code Here

Examples of org.codehaus.jackson.org.objectweb.asm.ClassWriter.toByteArray()

        if (!_objectGetters.isEmpty()) {
            _addObjectGetters(cw, _objectGetters, beanClass);

        byte[] byteCode = cw.toByteArray();
        return classLoader.loadAndResolve(srcName, byteCode);

View Full Code Here

Examples of org.codehaus.jackson.util.ByteArrayBuilder.toByteArray()

                // otherwise, our triple is now complete
                decodedData = (decodedData << 6) | bits;
        return builder.toByteArray();

    public byte[] getBinaryValue() throws IOException
View Full Code Here

Examples of org.deuce.objectweb.asm.ClassWriter.toByteArray()

      ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
      PrintWriter writer = new PrintWriter(System.out);
      CheckClassAdapter cv = new CheckClassAdapter(cw);
      TraceClassVisitor tcv = new TraceClassVisitor(cv, writer );
      cr3.accept(tcv, ClassReader.EXPAND_FRAMES);
      byte[] newFile = cw.toByteArray();
      return newFile;
    return ((ClassWriter)super.cv).toByteArray();
View Full Code Here

Examples of org.drools.asm.ClassWriter.toByteArray()

        this.buildToString( cw,
                            classDef );


        return cw.toByteArray();

     * Defines the class header for the given class definition
View Full Code Here

Examples of org.eclipse.jgit.util.TemporaryBuffer.toByteArray()

  private static byte[] readFully(final InputStream is) throws IOException {
    final TemporaryBuffer b = new TemporaryBuffer.LocalFile();
    try {
      return b.toByteArray();
    } finally {
View Full Code Here

Examples of org.eclipse.persistence.internal.libraries.asm.ClassWriter.toByteArray()

        AnnotationVisitor av = cw.visitAnnotation("Ljavax/xml/bind/annotation/XmlType;", true);
        av.visit("namespace", namespace);


        byte[] classBytes = cw.toByteArray();
        return generateClassFromBytes(qualifiedClassName, classBytes);

    private Class generateWrapperForArrayClass(JavaClass arrayClass, TypeMappingInfo typeMappingInfo, Class xmlElementType, List<JavaClass> classesToProcess) {
        JavaClass componentClass = null;
View Full Code Here
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.