Examples of writeShort()


Examples of codechicken.lib.packet.PacketCustom.writeShort()

    }

    public static void sendSetSlot(int slot, ItemStack stack, boolean container) {
        PacketCustom packet = new PacketCustom(channel, 5);
        packet.writeBoolean(container);
        packet.writeShort(slot);
        packet.writeItemStack(stack);
        packet.sendToServer();
    }

    private static void sendRequestLoginInfo() {
View Full Code Here

Examples of com.alibaba.dubbo.common.serialize.ObjectOutput.writeShort()

    }

    @Test
    public void test_Short() throws Exception {
        ObjectOutput objectOutput = serialization.serialize(url, byteArrayOutputStream);
        objectOutput.writeShort((short) 123);
        objectOutput.flushBuffer();

        ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream(
                byteArrayOutputStream.toByteArray());
        ObjectInput deserialize = serialization.deserialize(url, byteArrayInputStream);
View Full Code Here

Examples of com.envoisolutions.sxc.util.XoXMLStreamWriter.writeShort()

                } else if (c == Long.class) {
                    w.writeLong((Long) o);
                } else if (c == Integer.class) {
                    w.writeInt((Integer) o);
                } else if (c == Short.class) {
                    w.writeShort((Short) o);
                } else if (c == Duration.class) {
                    w.writeCharacters(((Duration) o).toString());
                } else if (c == XMLGregorianCalendar.class) {
                    w.writeCharacters(((XMLGregorianCalendar) o).toXMLFormat());
                } else if (c == byte[].class) {
View Full Code Here

Examples of com.envoisolutions.sxc.util.XoXMLStreamWriterImpl.writeShort()

                } else if (c == Long.class) {
                    w.writeLong((Long) o);
                } else if (c == Integer.class) {
                    w.writeInt((Integer) o);
                } else if (c == Short.class) {
                    w.writeShort((Short) o);
                } else if (c == Duration.class) {
                    w.writeCharacters(((Duration) o).toString());
                } else if (c == XMLGregorianCalendar.class) {
                    w.writeCharacters(((XMLGregorianCalendar) o).toXMLFormat());
                } else if (c == byte[].class) {
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.netty.buffer.ChannelBuffer.writeShort()

            SpdyRstStreamFrame spdyRstStreamFrame = (SpdyRstStreamFrame) msg;
            ChannelBuffer frame = ChannelBuffers.buffer(
                    ByteOrder.BIG_ENDIAN, SPDY_HEADER_SIZE + 8);
            frame.writeShort(version | 0x8000);
            frame.writeShort(SPDY_RST_STREAM_FRAME);
            frame.writeInt(8);
            frame.writeInt(spdyRstStreamFrame.getStreamId());
            frame.writeInt(spdyRstStreamFrame.getStatus().getCode());
            Channels.write(ctx, e.getFuture(), frame, e.getRemoteAddress());
            return;
View Full Code Here

Examples of com.google.common.io.ByteArrayDataOutput.writeShort()

            // field 2: status, 1 byte:
            sourceOutput.write(status);

            // field 3: network byte order port number, 2 bytes
            sourceOutput.writeShort(port);

            // field 4: network byte order IP address, 4 bytes
            sourceOutput.writeInt(address);

            // write all at once to avoid Jetty bug
View Full Code Here

Examples of com.higherfrequencytrading.chronicle.Excerpt.writeShort()

                        excerpt.finish();

                        excerpt2.startExcerpt(8);
                        excerpt2.writeChar('R');
                        excerpt2.writeInt(n);
                        excerpt2.writeShort(-1);
                        excerpt2.finish();
                    }
                } catch (IOException e) {
                    e.printStackTrace();
                }
View Full Code Here

Examples of com.lightcrafts.utils.file.OrderableRandomAccessFile.writeShort()

                        TIFFMetadataReader.calcIFDEntryOffset( ifdOffset, entry );
                    file.seek( entryOffset );
                    final int tagID = file.readUnsignedShort();
                    if ( tagID == TIFF_PHOTOSHOP_IMAGE_RESOURCES ) {
                        file.seek( file.getFilePointer() - TIFF_SHORT_SIZE );
                        file.writeShort( TIFF_EXIF_IFD_POINTER );
                        file.writeShort( TIFF_FIELD_TYPE_ULONG );
                        file.writeInt( 1 );
                        final int subdirOffset = file.readInt();
                        fixEXIFDirectory( file, subdirOffset, 0 );
                        return;
View Full Code Here

Examples of com.maverick.util.ByteArrayWriter.writeShort()

            } else if (value instanceof Integer) {
                writer.writeInt(((Integer) value).intValue());
            } else if (value instanceof Long) {
                writer.writeUINT64(((Long) value).longValue());
            } else if (value instanceof Short) {
                writer.writeShort(((Short) value).shortValue());
            } else if (value instanceof Boolean) {
                writer.writeBoolean(((Boolean) value).booleanValue());
            } else if (value instanceof Date) {
                writer.writeUINT64(((Date) value).getTime());
            } else {
View Full Code Here

Examples of com.mobixess.jodb.core.io.IRandomAccessDataBuffer.writeShort()

            arrayElementSize = byteHolder._value;
        }
       
        int objId = composeEntryID( JODBIOBase.ENTRY_OBJECT_ID, lengthEstimate);
        int objIdWithRedirectionBit = tHandle.isNewObject()? objId : JODBIOBase.addRedirectedObjectModifier(objId);
        transactionFile.writeShort(objIdWithRedirectionBit);
        writeEntryLenForID(objId,0,transactionFile);//reserve space for length
       
        long objectBodyOffset = transactionFile.getCursorOffset();
       
//        if(JODBConfig.DEBUG){
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.