Examples of toByteArray()


Examples of org.apache.activemq.util.ByteArrayOutputStream.toByteArray()

            final String receiptId = command.getHeaders().get(Stomp.Headers.RECEIPT_REQUESTED);
            if (receiptId != null) {
                headers.put(Stomp.Headers.Response.RECEIPT_ID, receiptId);
            }

            StompFrame errorMessage = new StompFrame(Stomp.Responses.ERROR, headers, baos.toByteArray());
            sendToStomp(errorMessage);

            if (e.isFatal()) {
                getTransportFilter().onException(e);
            }
View Full Code Here

Examples of org.apache.aries.proxy.impl.common.OSGiFriendlyClassWriter.toByteArray()

                               new WovenProxyAdapter(cWriter, className, loader));
   
    // If we are Java 1.6 + then we need to skip frames as they will be recomputed
    cReader.accept(weavingAdapter, AbstractWovenProxyAdapter.IS_AT_LEAST_JAVA_6 ? ClassReader.SKIP_FRAMES : 0);
   
    return cWriter.toByteArray();
  }
}
View Full Code Here

Examples of org.apache.axis.utils.ByteArrayOutputStream.toByteArray()

              docRes = stsMgr.handleRequest(docReq, docRes);
//              log.debug("STSServerHandler: STSManager has done the job");
              ByteArrayOutputStream os = new ByteArrayOutputStream();
              XMLUtils.outputDOM(docRes, os, true);
              //modify the current message
              sPartRes.setCurrentMessage(os.toByteArray(), SOAPPart.FORM_BYTES);  
              //set current message to the context
        //msgCntxt.setCurrentMessage(sPartRes.getMessage());
        //msgCntxt.setPastPivot(true);
        //msgCntxt.setPastPivot(true);
        msgCntxt.setCurrentMessage(sPartRes.getMessage());
View Full Code Here

Examples of org.apache.cassandra.io.util.DataOutputBuffer.toByteArray()

        {
            DataOutputBuffer out = new DataOutputBuffer();
            DeletionTime.serializer.serialize(cf.deletionInfo().getTopLevelDeletion(), out);
            out.writeInt(cf.getColumnCount());
            new ColumnIndex.Builder(cf, ByteBufferUtil.EMPTY_BYTE_BUFFER, out).build(cf);
            return ByteBuffer.wrap(out.toByteArray());
        }
        catch (IOException e)
        {
            throw new RuntimeException(e);
        }
View Full Code Here

Examples of org.apache.cassandra.io.util.FastByteArrayOutputStream.toByteArray()

        }
        catch (IOException e)
        {
            throw new IOError(e);
        }
        return new Message(FBUtilities.getBroadcastAddress(), StorageService.Verb.STREAM_REQUEST, bos.toByteArray(), version);
    }

    public String toString()
    {
        StringBuilder sb = new StringBuilder("");
View Full Code Here

Examples of org.apache.commons.io.output.ByteArrayOutputStream.toByteArray()

     * @throws IOException if an I/O error occurs
     */
    public static byte[] toByteArray(InputStream input) throws IOException {
        ByteArrayOutputStream output = new ByteArrayOutputStream();
        copy(input, output);
        return output.toByteArray();
    }

    /**
     * Get the contents of a <code>Reader</code> as a <code>byte[]</code>
     * using the default character encoding of the platform.
View Full Code Here

Examples of org.apache.cxf.common.util.ASMHelper.ClassWriter.toByteArray()

            mv.visitMaxs(3, 4);
            mv.visitEnd();

            cw.visitEnd();

            byte bts[] = cw.toByteArray();
            cls = helper.loadClass(className,
                                   mcls, bts);
        }
        try {
            return cls.getConstructor(Map.class).newInstance(map);
View Full Code Here

Examples of org.apache.cxf.helpers.LoadingByteArrayOutputStream.toByteArray()

                    }
                    DOMSource ds = new DOMSource(el, baseURI);  
                    schemaSourcesMap2.put(si.getSystemId() + ":" + si.getNamespaceURI(), ds);
                    LoadingByteArrayOutputStream out = new LoadingByteArrayOutputStream();
                    StaxUtils.copy(el, StaxUtils.createXMLStreamWriter(out));
                    schemaSourcesMap.put(si.getSystemId() + ":" + si.getNamespaceURI(), out.toByteArray());
                }

               
                for (XmlSchema sch : serviceInfo.getXmlSchemaCollection().getXmlSchemas()) {
                    if (sch.getSourceURI() != null
View Full Code Here

Examples of org.apache.derby.catalog.UUID.toByteArray()

        + uuid.toString();
      out.printlnWithHeader(message);
      resultSoFar =  false;
    }

    byte[] uuidByteArray = uuid.toByteArray();
    UUID uuid_b = factory.recreateUUID(uuidByteArray);
    if (!uuid_b.equals(uuid))
    {
      // Resolve: format this with a message factory
      String badByteArrayString = "";
View Full Code Here

Examples of org.apache.giraph.utils.UnsafeByteArrayOutputStream.toByteArray()

      value.write(bos);
      bos.close();
    } catch (IOException ioe) {
      throw new RuntimeException("Could not serialize vertex value", ioe);
    }
    this.valueBytes = bos.toByteArray();
    cachedValue = null;
  }

  @Override
  public void setValue(V value) {
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.