Package com.google.common.io

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


            // 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

                    byte[] data = new byte[ len ];
                    in.readFully( data );

                    // Prepare new data to send
                    out.writeUTF( channel );
                    out.writeShort( data.length );
                    out.write( data );
                    byte[] payload = out.toByteArray();

                    target.getServer().sendData( "BungeeCord", payload );
                }
View Full Code Here

                byte[] data = new byte[ len ];
                in.readFully( data );

                // Prepare new data to send
                out.writeUTF( channel );
                out.writeShort( data.length );
                out.write( data );
                byte[] payload = out.toByteArray();

                // Null out stream, important as we don't want to send to ourselves
                out = null;
View Full Code Here

                if ( info != null )
                {
                    out.writeUTF( "ServerIP" );
                    out.writeUTF( info.getName() );
                    out.writeUTF( info.getAddress().getAddress().getHostAddress() );
                    out.writeShort( info.getAddress().getPort() );
                }
            }
            if ( subChannel.equals( "KickPlayer" ) )
            {
                ProxiedPlayer player = bungee.getPlayer( in.readUTF() );
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.