Examples of writeInt()


Examples of org.apache.lucene.store.OutputStream.writeInt()

    <code>d</code>, in a format that can be read by the constructor {@link
    #BitVector(Directory, String)}.  */
  public final void write(Directory d, String name) throws IOException {
    OutputStream output = d.createFile(name);
    try {
      output.writeInt(size());        // write size
      output.writeInt(count());        // write count
      output.writeBytes(bits, bits.length);    // write bits
    } finally {
      output.close();
    }
View Full Code Here

Examples of org.apache.poi.util.LittleEndianByteArrayOutputStream.writeInt()

        // EncryptionVersionInfo (4 bytes): A Version structure (section 2.1.4), where
        // Version.vMajor MUST be 0x0004 and Version.vMinor MUST be 0x0004
        leos.writeShort(info.getVersionMajor());
        leos.writeShort(info.getVersionMinor());
        // Reserved (4 bytes): A value that MUST be 0x00000040
        leos.writeInt(0x40);
        leos.write(bos.toByteArray());
       
        dir.createDocument("EncryptionInfo", leos.getWriteIndex(), new POIFSWriterListener() {
            public void processPOIFSWriterEvent(POIFSWriterEvent event) {
                try {
View Full Code Here

Examples of org.apache.poi.util.LittleEndianOutput.writeInt()

            for (int i=0; i<referenceComponent.length; i++) {
                os.writeInt(referenceComponentType[i]);
                writeUnicodeLPP4(os, referenceComponent[i]);
            }
            writeUnicodeLPP4(os, dataSpaceName);
            sizeOut.writeInt(os.getWriteIndex()-start);
        }
    }
   
    public static class DataSpaceDefinition implements EncryptionRecord {
        String transformer[];
View Full Code Here

Examples of org.apache.poi.util.LittleEndianOutputStream.writeInt()

            leos.write(0);
            leos.write(getFileName().getBytes(ISO1));
            leos.write(0);
            leos.writeShort(getFlags2());
            leos.writeShort(getUnknown1());
            leos.writeInt(getCommand().length() + 1);
            leos.write(getCommand().getBytes(ISO1));
            leos.write(0);
            leos.writeInt(getDataSize());
            leos.write(getDataBuffer());
            leos.writeShort(getFlags3());
View Full Code Here

Examples of org.apache.qpid.client.message.JMSBytesMessage.writeInt()

    public void testEOFInt() throws Exception
    {
        try
        {
            JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
            bm.writeInt(99);
            bm.reset();
            bm.readInt();
            // should throw
            bm.readInt();
            fail("expected exception did not occur");
View Full Code Here

Examples of org.apache.qpid.client.message.JMSStreamMessage.writeInt()

    }

    public void testWriteInt() throws Exception
    {
        JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
        bm.writeInt(10);
        bm.reset();
        int val = bm.readInt();
        assertTrue(val == 10);
    }
View Full Code Here

Examples of org.apache.tapestry.internal.util.Base64ObjectOutputStream.writeInt()

        try
        {
            os = new Base64ObjectOutputStream();

            os.writeInt(_persistedValues.size());

            for (Map.Entry<Key, Object> e : _persistedValues.entrySet())
            {
                os.writeObject(e.getKey());
                os.writeObject(e.getValue());
View Full Code Here

Examples of org.apache.tapestry5.internal.util.Base64ObjectOutputStream.writeInt()

        try
        {
            os = new Base64ObjectOutputStream();

            os.writeInt(persistedValues.size());

            for (Map.Entry<Key, Object> e : persistedValues.entrySet())
            {
                os.writeObject(e.getKey());
                os.writeObject(e.getValue());
View Full Code Here

Examples of org.codehaus.activemq.message.ActiveMQBytesMessage.writeInt()

    }
  }
  public void testReadInt() {
    ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
    try {
      msg.writeInt(3000);
      msg.reset();
      assertTrue(msg.readInt() == 3000);
    } catch (JMSException jmsEx) {
      jmsEx.printStackTrace();
      assertTrue(false);
View Full Code Here

Examples of org.codehaus.activemq.message.ActiveMQStreamMessage.writeInt()

      msg.reset();
      assertTrue(((Short)msg.readObject()).shortValue()==testShort);
      msg.clearBody();
     
      int testInt = 4;
      msg.writeInt(testInt);
      msg.reset();
      assertTrue(((Integer)msg.readObject()).intValue()==testInt);
      msg.clearBody();
     
      long testLong = 6l;
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.