Examples of toByteArray()


Examples of org.jboss.resteasy.util.InputStreamToByteArray.toByteArray()

                    .getHttpHeaders().getRequestHeaders(), is, request);
            final Object obj = messageBodyReaderContext.proceed();
            if (isMarshalledEntity)
            {
               InputStreamToByteArray isba = (InputStreamToByteArray) is;
               final byte[] bytes = isba.toByteArray();
               return new MarshalledEntity()
               {
                  @Override
                  public byte[] getMarshalledBytes()
                  {
View Full Code Here

Examples of org.jivesoftware.openfire.cluster.NodeID.toByteArray()

            Cache<String, ClientRoute> usersCache = CacheFactory.createCache(RoutingTableImpl.C2S_CACHE_NAME);
            ClientRoute route = usersCache.get(address.toString());
            NodeID nodeID = route.getNodeID();

            Log.warn("Found remote session instead of local session. JID: " + address + " found in Node: " +
                    nodeID.toByteArray() + " and local node is: " + XMPPServer.getInstance().getNodeID().toByteArray());
        }
        if (operation == Operation.isInitialized) {
            if (session instanceof RemoteClientSession) {
                // Something is wrong since the session shoud be local instead of remote
                // Assume some default value
View Full Code Here

Examples of org.jnode.net.ProtocolAddress.toByteArray()

                }
                final int cnt = addrs.length;
                for (int j = 0; j < cnt; j++) {
                    final ProtocolAddress pa = addrs[j];
                    if (pa != null) {
                        list.add(pa.toByteArray());
                    }
                }
            }
        }
View Full Code Here

Examples of org.jnode.net.SocketBuffer.toByteArray()

                    SocketBuffer packet = rxRing.currentDesc().getPacket();
                    driver.onReceive(packet);
                    log.debug("New packet");
                    log.debug(packet.getLinkLayerHeader().getSourceAddress());
                    log.debug(packet.getLinkLayerHeader().getDestinationAddress());
                    log.debug('\n' + hexDump(packet.toByteArray()) + '\n');
                    rxRing.currentDesc().setOwnBit();
                    rxRing.next();
                }

            } catch (Exception e) {
View Full Code Here

Examples of org.jongo.bson.BsonDocument.toByteArray()

        return objectIdUpdater.getId(pojo);
    }

    private DBObject convertToDBObject(Object pojo, Object id) {
        BsonDocument document = asBsonDocument(marshaller, pojo);
        return new LazyIdDBObject(document.toByteArray(), marshaller, id);
    }

    private final static class LazyIdDBObject extends LazyWriteableDBObject {

        private final Object id;
View Full Code Here

Examples of org.jwall.rbl.dns.Response.toByteArray()

        log.debug( "Received packet of size {} bytes: {}", data.length, new String(data) );
       
        Query q = Query.parse( data, 0 );
        Response response = queryHandler.process( packet.getAddress(), q );

        byte[] re = response.toByteArray();
        DatagramPacket answer = new DatagramPacket( re, 0 );
        answer.setLength( re.length );
        answer.setAddress( packet.getAddress() );
        answer.setPort( packet.getPort() );
        socket.send( answer );
View Full Code Here

Examples of org.kiji.schema.layout.impl.ColumnId.toByteArray()

      throw new NoSuchColumnException(kijiColumnName.toString());
    }

    final ColumnId familyID = family.getId();

    final byte[] familyBytes = familyID.toByteArray();

    if (qualifierName == null) {
      // Unqualified column
      return new CassandraColumnName(familyBytes, null);
    } else if (family.isGroupType()) {
View Full Code Here

Examples of org.kitesdk.morphline.protobuf.Protos.Complex.Link.toByteArray()

    complexBuilder.setType(Type.UPDATE);
    complex = complexBuilder.build();

    nameBytes = name.toByteArray();
    link1Bytes = link1.toByteArray();
    link2Bytes = link2.toByteArray();
  }

  @BeforeClass
  public static void prepareInputReadProto() {
    RepeatedLongs.Builder repeatedLongsBuilder = RepeatedLongs.newBuilder();
View Full Code Here

Examples of org.kitesdk.morphline.protobuf.Protos.Complex.Name.toByteArray()

    complexBuilder.addLink(link1);
    complexBuilder.addLink(link2);
    complexBuilder.setType(Type.UPDATE);
    complex = complexBuilder.build();

    nameBytes = name.toByteArray();
    link1Bytes = link1.toByteArray();
    link2Bytes = link2.toByteArray();
  }

  @BeforeClass
View Full Code Here

Examples of org.kocakosm.pitaya.util.ByteBuffer.toByteArray()

    buf.append(b);
    b = new byte[20];
    int len = in.read(b, 0, 15);
    buf.append(b, 0, len);
    assertEquals(16, in.getCount());
    assertArrayEquals(DATA, buf.toByteArray());
  }

  @Test
  public void testCount() throws IOException
  {
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.