Examples of toByteArray()


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

        mv.visitMaxs(0, 0);
        mv.visitEnd();

        cw.visitEnd();

        return cw.toByteArray();
    }

    public static byte[] dump1() {
        ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
        FieldVisitor fv;
View Full Code Here

Examples of org.ow2.easybeans.asm.ClassWriter.toByteArray()

        mv.visitMaxs(1, 1);
        mv.visitEnd();

        cw.visitEnd();

        return cw.toByteArray();
    }

}
View Full Code Here

Examples of org.pdfbox.util.PDFOperator.toByteArray()

                    count++;
                }
                pdfSource.unread( 'I' ); //unread the EI operator
                pdfSource.unread( 'E' );
                retval = PDFOperator.getOperator( "ID" );
                ((PDFOperator)retval).setImageData( imageData.toByteArray() );
                break;
            }
            case ']':
            {
                // some ']' around without its previous '['
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.MemoryByteArrayOutputStream.toByteArray()

    {
      try
      {
        final MemoryByteArrayOutputStream bout = new MemoryByteArrayOutputStream();
        IOUtils.getInstance().copyStreams(byteStream, bout);
        return bout.toByteArray();
      }
      finally
      {
        byteStream.close();
      }
View Full Code Here

Examples of org.pentaho.reporting.libraries.base.util.MemoryByteArrayOutputStream.toByteArray()

    ct.setPrintDetailsHeader(false);

    final MemoryByteArrayOutputStream outputStream = new MemoryByteArrayOutputStream();
    HtmlReportUtil.createStreamHTML(report, outputStream);

    final String htmlText = new String(outputStream.toByteArray(), "UTF-8");
    DebugLog.log(htmlText);
    assertTrue(htmlText.contains("<td colspan=\"2\" valign=\"top\" class=\"style-1\">2003</td>"));
    assertTrue(htmlText.contains("<td colspan=\"2\" valign=\"top\" class=\"style-1\">2004</td>"));
    assertTrue(htmlText.contains("<td colspan=\"2\" valign=\"top\" class=\"style-1\">2005</td>"));
    assertTrue(htmlText.contains("<td valign=\"top\" class=\"style-3\">Product Line</td>"));
View Full Code Here

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

        }
        final ClassReader reader = new ClassReader(classfileBuffer);
        final ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_MAXS);
        reader.accept(new PowerMockClassVisitor(writer),
                ClassReader.SKIP_FRAMES);
        return writer.toByteArray();
    }

}
View Full Code Here

Examples of org.protocol.gtp.prime.GtpPrimeHeader.toByteArray()

  @Test
  public void testEncodeFromMessageConstructor() throws Exception {
    GtpPrimeHeader t1 = new GtpPrimeHeader(properHeader);
    validateHeader(t1);
    byte[] tmp = t1.toByteArray();
    assertArrayEquals(properHeader, t1.toByteArray());
  }

 
  @Test
View Full Code Here

Examples of org.rsbot.loader.asm.ClassWriter.toByteArray()

        byte[] bytes = IOHelper.read(in);

        final ClassReader reader = new ClassReader(bytes);
        final ClassWriter writer = new ClassWriter(0);
        reader.accept(new RemappingClassAdapter(writer, ScriptMapper.getInstance()), ClassReader.SKIP_DEBUG | ClassReader.SKIP_FRAMES);
        bytes = writer.toByteArray();

        clazz = defineClass(name, bytes, 0, bytes.length, domain);
        if (resolve) {
          resolveClass(clazz);
        }
View Full Code Here

Examples of org.scale7.cassandra.pelops.Bytes.toByteArray()

            {
                Bytes rowKey = rowIter.next();

                PropertyAccessor<?> accessor = PropertyAccessorFactory.getPropertyAccessor((Field) metadata
                        .getIdAttribute().getJavaMember());
                Object value = accessor.fromBytes(metadata.getIdAttribute().getJavaType(), rowKey.toByteArray());

                rowKeys.add(value);
            }
        }
        if (rowKeys != null && !rowKeys.isEmpty())
View Full Code Here

Examples of org.snmp4j.smi.OctetString.toByteArray()

        ",packetID="+packetID+",byteOrder="+byteOrder+toStringExtMembers()+"]";
  }

  public static void main(String[] args) {
    OctetString s = OctetString.fromHexString(args[0]);
    ByteBuffer buf = ByteBuffer.wrap(s.toByteArray());
    try {
      AgentXPDU pdu = AgentXPDU.decode(buf);
      System.out.println(pdu.toString());
    }
    catch (IOException ex) {
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.