Examples of toByteArray()


Examples of org.kohsuke.asm3.ClassWriter.toByteArray()

            m.visitMaxs(index,index);
            m.visitEnd();
        }

        cw.visitEnd();
        byte[] image = cw.toByteArray();

        Class<? extends T> c = defineClass(name, image, 0, image.length).asSubclass(base);

        Jenkins h = Jenkins.getInstance();
        if (h!=null)    // null only during tests.
View Full Code Here

Examples of org.lilyproject.bytes.api.DataOutput.toByteArray()


    public static void writeMetadataWithLengthSuffix(Metadata metadata, DataOutput output) {
        DataOutput tmp = new DataOutputImpl();
        MetadataSerDeser.write(metadata, tmp);
        byte[] metadataBytes = tmp.toByteArray();
        output.writeBytes(metadataBytes);
        output.writeInt(metadataBytes.length);
    }

    private boolean isDeleteMarker(Object fieldValue) {
View Full Code Here

Examples of org.lilyproject.bytes.impl.DataOutputImpl.toByteArray()


    public static void writeMetadataWithLengthSuffix(Metadata metadata, DataOutput output) {
        DataOutput tmp = new DataOutputImpl();
        MetadataSerDeser.write(metadata, tmp);
        byte[] metadataBytes = tmp.toByteArray();
        output.writeBytes(metadataBytes);
        output.writeInt(metadataBytes.length);
    }

    private boolean isDeleteMarker(Object fieldValue) {
View Full Code Here

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

        ClassWriter cw = new ClassWriter(0);
        cw.visit(V1_6, ACC_PUBLIC + ACC_ABSTRACT + ACC_INTERFACE, relativePath, null, "java/lang/Object", null);
        cw.visitEnd();

        return cw.toByteArray();
    }

}
View Full Code Here

Examples of org.mockito.cglib.core.DebuggingClassWriter.toByteArray()

        }

        try {
            ClassWriter w =  new DebuggingClassWriter(ClassWriter.COMPUTE_MAXS);
            getGenerator(r).generateClass(w);
            byte[] b = w.toByteArray();
            Class c = super.defineClass(name, b, 0, b.length, DOMAIN);
            postProcess(c);
            return c;
        } catch (RuntimeException e) {
            throw e;
View Full Code Here

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

        //3.Read
        String resName = superClass.getName().replace(".", "/") + ".class";
        InputStream inStream = superClass.getClassLoader().getResourceAsStream(resName);
        ClassReader reader = new ClassReader(inStream);//创建ClassReader
        reader.accept(visitor, ClassReader.SKIP_DEBUG);
        return writer.toByteArray();
    }
    /**是否包含改变*/
    public boolean hasChange() {
        return (this.aopList == null) ? false : (!this.aopList.isEmpty());
    }
View Full Code Here

Examples of org.more.util.io.output.ByteArrayOutputStream.toByteArray()

     * @throws IOException if an I/O error occurs
     */
    public static byte[] toByteArray(final InputStream input) throws IOException {
        ByteArrayOutputStream output = new ByteArrayOutputStream();
        IOUtils.copy(input, output);
        return output.toByteArray();
    }
    /**
     * Get contents of an <code>InputStream</code> as a <code>byte[]</code>.
     * Use this method instead of <code>toByteArray(InputStream)</code>
     * when <code>InputStream</code> size is known.
View Full Code Here

Examples of org.mortbay.util.ByteArrayOutputStream2.toByteArray()

                try
                {
                    save(bout);
                   
                    // TODO real encryption.... 
                    byte[] buf = bout.toByteArray();
                    String encoded=new String(B64Code.encode(buf));
                    message.put(Bayeux.DATA_FIELD,encoded);
                }
                catch(Exception e)
                {
View Full Code Here

Examples of org.moyrax.javascript.instrument.ComponentClassAdapter.toByteArray()

        ScriptUtils.isExportable(className, this)) {
      try {
        ComponentClassAdapter adapter = new ComponentClassAdapter(className,
            this);

        byte[] bytecode = adapter.toByteArray();

        result = defineClass(className, bytecode, 0, bytecode.length);

        loaded.put(className, result);
      } catch (IOException ex) {
View Full Code Here

Examples of org.mozilla.classfile.ClassFileWriter.toByteArray()

                "println",
                "(Ljava/lang/String;)V");
        c.add(ByteCode.RETURN);
        c.stopMethod((short) 1);

        return c.toByteArray();
    }

    static org.apache.bcel.generic.Type printStreamT = org.apache.bcel.generic.Type.getType("Ljava/io/PrintStream;");

    static byte[] bcelHelloWorld() {
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.