Examples of toByteArray()


Examples of org.glassfish.hk2.external.org.objectweb.asm.ClassWriter.toByteArray()

            final ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
            return new ASMContentHandler(cw) {
                @Override
                public void endDocument() throws SAXException {
                    try {
                        os.write(cw.toByteArray());
                    } catch (IOException e) {
                        throw new SAXException(e);
                    }
                }
            };
View Full Code Here

Examples of org.hbase.async.generated.ComparatorPB.BinaryComparator.toByteArray()

    final BinaryComparator cmp = BinaryComparator.newBuilder()
      .setComparable(expected)
      .build();
    final Comparator comparator = Comparator.newBuilder()
      .setNameBytes(BINARYCOMPARATOR)
      .setSerializedComparator(Bytes.wrap(cmp.toByteArray()))
      .build();
    final Condition cond = Condition.newBuilder()
      .setRow(key)
      .setFamily(family)
      .setQualifier(qualifier)
View Full Code Here

Examples of org.hibernate.repackage.cglib.asm.ClassWriter.toByteArray()

        reader = new ClassReader( new ByteArrayInputStream( classfileBuffer ) );
        new TransformingClassGenerator(
            new ClassReaderGenerator( reader, attributes(), skipDebug() ), t
        ).generateClass( w );
        out = new ByteArrayOutputStream();
        out.write( w.toByteArray() );
        result = out.toByteArray();
        out.close();
      }
      catch (Exception e) {
        log.error( "Unable to transform class", e );
View Full Code Here

Examples of org.hibernate.repackage.cglib.core.DebuggingClassWriter.toByteArray()

        reader = new ClassReader( new ByteArrayInputStream( classfileBuffer ) );
        new TransformingClassGenerator(
            new ClassReaderGenerator( reader, attributes(), skipDebug() ), t
        ).generateClass( w );
        out = new ByteArrayOutputStream();
        out.write( w.toByteArray() );
        result = out.toByteArray();
        out.close();
      }
      catch (Exception e) {
        log.error( "Unable to transform class", e );
View Full Code Here

Examples of org.hsqldb.lib.HsqlByteArrayOutputStream.toByteArray()

        try {
            java.io.InputStream in = x.getBinaryStream();
            HsqlByteArrayOutputStream out = new HsqlByteArrayOutputStream(in,
                (int) length);

            setParameter(parameterIndex, out.toByteArray());
        } catch (IOException e) {
            throw Util.sqlException(ErrorCode.JDBC_INPUTSTREAM_ERROR,
                                    e.toString());
        }
    }
View Full Code Here

Examples of org.hsqldb_voltpatches.lib.HsqlByteArrayOutputStream.toByteArray()

        if (i == 0) {
            return null;
        }

        return isBinary ? new BinaryData(os.toByteArray(), false)
                        : sb.toString();
    }

    Boolean compare(Session session, Object o) {
View Full Code Here

Examples of org.infinispan.commons.io.ExposedByteArrayOutputStream.toByteArray()

      ObjectOutputStream oos = new ObjectOutputStream(baos);
      objectToObjectStream(o, oos);
      oos.flush();
      oos.close();
      baos.close();
      byte[] b = baos.toByteArray();
      return new ByteBuffer(b, 0, b.length);
   }

   @Override
   public Object objectFromByteBuffer(byte[] buf, int offset, int length) throws IOException, ClassNotFoundException {
View Full Code Here

Examples of org.infinispan.io.ExposedByteArrayOutputStream.toByteArray()

      ObjectOutputStream oos = new ObjectOutputStream(baos);
      objectToObjectStream(o, oos);
      oos.flush();
      oos.close();
      baos.close();
      byte[] b = baos.toByteArray();
      return new ByteBuffer(b, 0, b.length);
   }

   @Override
   public Object objectFromByteBuffer(byte[] buf, int offset, int length) throws IOException, ClassNotFoundException {
View Full Code Here

Examples of org.jboss.errai.marshalling.server.util.UnwrappedByteArrayOutputStream.toByteArray()

  public void wake() {
    try {
      if (isDirectChannelOpen()) {
        UnwrappedByteArrayOutputStream outputStream = new UnwrappedByteArrayOutputStream();
        buffer.read(outputStream, bufferColor, new BufferHelper.MultiMessageHandlerCallback());
        directSocketChannel.write(new TextWebSocketFrame(new String(outputStream.toByteArray(), 0, outputStream.size())));
      }
      else {
        BufferHelper.encodeAndWriteNoop(buffer, bufferColor);
      }
View Full Code Here

Examples of org.jboss.ha.framework.server.SimpleCachableMarshalledValue.toByteArray()

     
      Object guid2 =  copy.get();
      assertNotSame(guid, guid2);
      assertEquals(guid, guid2);
     
      copy.toByteArray();
      SimpleCachableMarshalledValue triplet = replicate(copy);
      guid2 = triplet.get();
      assertEquals(guid, guid2);
     
      mv = new SimpleCachableMarshalledValue(null);
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.