Examples of writeInt()


Examples of org.codehaus.stax2.typed.TypedXMLStreamWriter.writeInt()

        TypedXMLStreamWriter sw = (TypedXMLStreamWriter) of.createXMLStreamWriter(new DOMResult(doc));

        sw.writeStartDocument();
        sw.writeStartElement("root");
        sw.writeIntAttribute(null, null, "attr", -900);
        sw.writeInt(123);
        sw.writeEndElement();
        sw.writeEndDocument();
        sw.close();

        Element root = doc.getDocumentElement();
View Full Code Here

Examples of org.elasticsearch.common.io.stream.BytesStreamOutput.writeInt()

    @Test public void testSimpleStreams() throws Exception {
        BytesStreamOutput out = CachedStreamOutput.popEntry().cachedBytes();
        out.writeBoolean(false);
        out.writeByte((byte) 1);
        out.writeShort((short) -1);
        out.writeInt(-1);
        out.writeVInt(2);
        out.writeLong(-3);
        out.writeVLong(4);
        out.writeFloat(1.1f);
        out.writeDouble(2.2);
View Full Code Here

Examples of org.elasticsearch.common.io.stream.HandlesStreamOutput.writeInt()

        HandlesStreamOutput out = new HandlesStreamOutput(bytesOut, 5);
        String lowerThresholdValue = "test";
        String higherThresholdValue = "something that is higher than 5";
        out.writeUTF(lowerThresholdValue);
        out.writeUTF(higherThresholdValue);
        out.writeInt(1);
        out.writeUTF("else");
        out.writeUTF(higherThresholdValue);
        out.writeUTF(lowerThresholdValue);

        HandlesStreamInput in = new HandlesStreamInput(new BytesStreamInput(bytesOut.copiedByteArray()));
View Full Code Here

Examples of org.elasticsearch.common.netty.buffer.ChannelBuffer.writeInt()

                    writeBuffer.writeByte(opcode); // opcode
                    writeBuffer.writeShort(0); // key length
                    writeBuffer.writeByte(0); // extra length = flags + expiry
                    writeBuffer.writeByte(0); // data type unused
                    writeBuffer.writeShort(0x0000); // OK
                    writeBuffer.writeInt(0); // data length
                    writeBuffer.writeInt(opaque); // opaque
                    writeBuffer.writeLong(0); // cas
                    channel.write(writeBuffer);
                    return MemcachedDispatcher.IGNORE_REQUEST;
                } else if (opcode == 0x07) { // QUIT
View Full Code Here

Examples of org.exist.storage.io.VariableByteOutputStream.writeInt()

        final Capture<Integer> intCapture = new Capture<Integer>();
        final Capture<String> strCapture = new Capture<String>();

        //write expectations
        mockOs.writeByte(captureByte(byteCapture));
        mockOs.writeInt(captureInt(intCapture));
        mockOs.writeUTF(capture(strCapture));

        replay(mockOs);

        symbolTable.localNameSymbols.write(mockOs);
View Full Code Here

Examples of org.exoplatform.services.jcr.dataflow.serialization.ObjectWriter.writeInt()

         OutputStream out = new FileOutputStream(srcSerialization);
         ObjectWriter ow = new ObjectWriterImpl(out);
         for (int i = 0; i < BLOCK_COUNT; i++)
         {
            ow.writeInt(1024);
            ow.writeInt(1024);
            ow.writeInt(1024);
            ow.writeLong(1024);
            ow.writeLong(1024);
            ow.writeLong(1024);
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.dataflow.serialization.ObjectWriterImpl.writeInt()

         OutputStream out = new FileOutputStream(srcSerialization);
         ObjectWriter ow = new ObjectWriterImpl(out);
         for (int i = 0; i < BLOCK_COUNT; i++)
         {
            ow.writeInt(1024);
            ow.writeInt(1024);
            ow.writeInt(1024);
            ow.writeLong(1024);
            ow.writeLong(1024);
            ow.writeLong(1024);
View Full Code Here

Examples of org.fusesource.hawtbuf.BufferEditor.writeInt()

                Buffer bs = bytesOut.toBuffer();
                if (compressed) {
                    int pos = bs.offset;
                    bs.offset = 0;
                    BufferEditor e = BufferEditor.big(bs);
                    e.writeInt(length);
                    bs.offset = pos;
                }
                setContent(bs);
                bytesOut = null;
                dataOut = null;
View Full Code Here

Examples of org.fusesource.hawtbuf.DataByteArrayOutputStream.writeInt()

        public int hashNode(N node, int i) {
            try {
                DataByteArrayOutputStream os = new DataByteArrayOutputStream();
                nodeCodec.encode(node, os);
                os.write(':');
                os.writeInt(i);
                return hash(os.toBuffer());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
View Full Code Here

Examples of org.gradle.messaging.serialize.FlushableEncoder.writeInt()

            encoder.writeString(uid);
            MultiChoiceAddress multiChoiceAddress = (MultiChoiceAddress) address;
            UUID canonicalAddress = (UUID) multiChoiceAddress.getCanonicalAddress();
            encoder.writeLong(canonicalAddress.getMostSignificantBits());
            encoder.writeLong(canonicalAddress.getLeastSignificantBits());
            encoder.writeInt(multiChoiceAddress.getPort());
            encoder.writeSmallInt(multiChoiceAddress.getCandidates().size());
            for (InetAddress inetAddress : multiChoiceAddress.getCandidates()) {
                encoder.writeBinary(inetAddress.getAddress());
            }
            encoder.writeString(daemonLog.getPath());
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.