Examples of readFrom()


Examples of org.jgroups.stack.IpAddress.readFrom()

                                                                  .append(") from ours (")
                                                                  .append(Version.printVersion())
                                                                  .append("). This may cause problems"));
                }
                Address client_peer_addr=new IpAddress();
                client_peer_addr.readFrom(in);

                updateLastAccessed();
                return client_peer_addr;
            }
            finally {
View Full Code Here

Examples of org.jgroups.util.Digest.readFrom()

        dos.close();
        byte[] buf=outstream.toByteArray();
        ByteArrayInputStream instream=new ByteArrayInputStream(buf);
        DataInputStream dis=new DataInputStream(instream);
        Digest tmp=new Digest();
        tmp.readFrom(dis);
        Assert.assertEquals(d, tmp);
    }


    public void testSerializedSize() throws Exception {
View Full Code Here

Examples of org.jpos.emv.EMVTagSequence.readFrom()

        packager.unpack(msg, packed);

        msg.recalcBitMap();

        tagValueSequence = new EMVTagSequence();
        tagValueSequence.readFrom((ISOMsg) msg.getComponent(48));

        Assert.assertEquals("Unpack error", 4, tagValueSequence.getAll().size());

        String tag1 = EMVStandardTagType.APPLICATION_PRIMARY_ACCOUNT_NUMBER_0x5A.getTagNumberHex();
        LiteralEMVTag pan = (LiteralEMVTag) tagValueSequence.getFirst(tag1);
View Full Code Here

Examples of org.jpos.tlv.GenericTagSequence.readFrom()

        msg = new ISOMsg();
        packager.unpack(msg, packed);

        tagValueSequence = new GenericTagSequence();
        tagValueSequence.readFrom((ISOMsg) msg.getComponent(48));
        tagValueSequence.readFrom((ISOMsg) msg.getComponent(62));

        Assert.assertEquals("Unpack error", 4, tagValueSequence.getAll().size());

        msg.recalcBitMap();
View Full Code Here

Examples of org.mortbay.io.Buffer.readFrom()

                {
                    Log.warn(e.toString());
                    Log.debug(e);
                    buffer = new IndirectNIOBuffer((int) length);
                }
                buffer.readFrom(is,(int)length);
                is.close();
            }
            content.setBuffer(buffer);
        }
    }
View Full Code Here

Examples of org.mortbay.io.ByteArrayBuffer.readFrom()

        try
        {
            InputStream in = content.getResource().getInputStream();
            int len=(int)content.getResource().length();
            Buffer buffer = new ByteArrayBuffer(len);
            buffer.readFrom(in,len);
            in.close();
            content.setBuffer(buffer);
        }
        finally
        {
View Full Code Here

Examples of org.ontoware.rdf2go.model.Model.readFrom()

    ClassLoader cl = Thread.currentThread().getContextClassLoader();
    InputStream in = cl.getResourceAsStream(resourceName);
    Model model = RDF2Go.getModelFactory().createModel();
    model.open();
    try {
      model.readFrom(in);
    } catch (ModelRuntimeException e) {
      throw new RuntimeException(e);
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
View Full Code Here

Examples of org.ontoware.rdf2go.model.ModelSet.readFrom()

  public void testSerialize() throws Exception {
    getModelSet().readFrom(TestData.getFoafAsStream(), Syntax.RdfXml);
    String serialize = getModelSet().serialize(Syntax.Nquads);
    ModelSet m1 = getModelFactory().createModelSet();
    m1.open();
    m1.readFrom(new StringReader(serialize), Syntax.Nquads);
    assertEquals(getModelSet().size(), m1.size());
    m1.close();
  }

}
View Full Code Here

Examples of org.openflow.protocol.OFMessage.readFrom()

                ((OFQueuePropertyFactoryAware)ofm).setQueuePropertyFactory(this);
            }
            if (ofm instanceof OFStatisticsFactoryAware) {
                ((OFStatisticsFactoryAware)ofm).setStatisticsFactory(this);
            }
            ofm.readFrom(data);
            if (OFMessage.class.equals(ofm.getClass())) {
                // advance the position for un-implemented messages
                data.position(data.position()+(ofm.getLengthU() -
                        OFMessage.MINIMUM_LENGTH));
            }
View Full Code Here

Examples of org.openflow.protocol.OFPacketQueue.readFrom()

        int availLength = (length - MINIMUM_LENGTH);
        this.queues.clear();

        while (availLength > 0) {
            OFPacketQueue queue = new OFPacketQueue();
            queue.readFrom(data);
            queues.add(queue);
            availLength -= queue.getLength();
        }
    }
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.