Examples of toByteArray()

Examples of com.alibaba.citrus.asm.ClassWriter.toByteArray()

            cr.accept(co, ClassReader.SKIP_DEBUG);

            Set constants = new TreeSet(new ConstantComparator());

            cr = new ClassReader(cw.toByteArray());
            cw = new ClassWriter(0);
            Iterator i = constants.iterator();
            while (i.hasNext()) {
                Constant c = (Constant) i.next();
View Full Code Here

Examples of com.alibaba.citrus.util.io.ByteArray.toByteArray()


        ByteArray bytes = requestContext.popByteBuffer();

        assertEquals("abc", new String(bytes.toByteArray()));

        // write, push, write, push, write, pop, pop, pop
View Full Code Here

Examples of com.alibaba.citrus.util.io.ByteArrayOutputStream.toByteArray()

            ((BufferedServletOutputStream) stream).updateOutputStream(bytesStack.peek());

            log.debug("Popped the last byte buffer (stack size is " + bytesStack.size() + ")");

            return block.toByteArray();

     * ���������buffer�������ջ��ֻ��һ��buffer���򵯳����ٴ���һ���µġ�
View Full Code Here

Examples of com.alibaba.dubbo.common.io.UnsafeByteArrayOutputStream.toByteArray()

                if (ProtocolUtils.isJavaGenericSerialization(generic)) {
                    try {
                        UnsafeByteArrayOutputStream os = new UnsafeByteArrayOutputStream(512);
                            .getExtension(Constants.GENERIC_SERIALIZATION_JAVA).serialize(null, os).writeObject(result.getValue());
                        return new RpcResult(os.toByteArray());
                    } catch (IOException e) {
                        throw new RpcException("Serialize result failed.", e);
                } else {
                    return new RpcResult(PojoUtils.generalize(result.getValue()));
View Full Code Here

Examples of com.alibaba.dubbo.rpc.protocol.thrift.io.RandomAccessByteArrayOutputStream.toByteArray()

        } catch ( TException e ) {
            throw new RpcException( RpcException.SERIALIZATION_EXCEPTION, e.getMessage(), e );



    private void encodeResponse( Channel channel, ChannelBuffer buffer, Response response )
            throws IOException {
View Full Code Here

Examples of com.alibaba.fastjson.asm.ClassWriter.toByteArray()

        _init(cw, new Context(className, config, beanInfo, 3));
        _createInstance(cw, new Context(className, config, beanInfo, 3));
        _deserialze(cw, new Context(className, config, beanInfo, 4));

        byte[] code = cw.toByteArray();

        // org.apache.commons.io.IOUtils.write(code, new java.io.FileOutputStream(
        // "/usr/alibaba/workspace-3.7/fastjson-asm/target/classes/"
        // + className + ".class"));
View Full Code Here

Examples of com.alibaba.wasp.EntityGroupTransaction.toByteArray()

    LOG.debug(zkw.prefix("Creating unassigned node for "
        + entityGroup.getEncodedName() + " in OFFLINE state"));
    EntityGroupTransaction rt = EntityGroupTransaction.createEntityGroupTransition(event,
        entityGroup.getEntityGroupName(), serverName);
    String node = getNodeName(zkw, entityGroup.getEncodedName());
    ZKUtil.createAndWatch(zkw, node, rt.toByteArray());

   * Creates an unassigned node in the OFFLINE state for the specified
   * entityGroup.
View Full Code Here

Examples of com.alibaba.wasp.protobuf.generated.MetaProtos.MessageProto.toByteArray()

  public static byte[] toMessage(Message message)
      throws InvalidProtocolBufferException {
    Action action = (Action) message;
    MessageProto proto = ProtobufUtil.convertWriteAction(action);
    return proto.toByteArray();
View Full Code Here

Examples of com.alibaba.wasp.protobuf.generated.MetaProtos.TransactionProto.toByteArray()

   * @return
  public byte[] getTransactionEntity() {
    TransactionProto tProto = conver(this);
    return tProto.toByteArray();

   * Parse data to Transaction.
View Full Code Here

Examples of com.android.dx.util.ByteArrayAnnotatedOutput.toByteArray()

        // Encode the data and note the size.

        ByteArrayAnnotatedOutput out = new ByteArrayAnnotatedOutput();

        encodeOutput(addedTo.getFile(), out);
        encodedForm = out.toByteArray();

     * Writes out the encoded form of this instance.
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.