Available Methods
- writeBytes ( )
- readableBytes ( )
- writeByte ( )
- release ( )
- writeInt ( )
- readBytes ( )
- readInt ( )
- readByte ( )
- writeShort ( )
- readerIndex ( )
- writeBoolean ( )
- isReadable ( )
- skipBytes ( )
- writerIndex ( )
- readUnsignedByte ( )
- writeLong ( )
- readBoolean ( )
- toString ( )
- readUnsignedShort ( )
- getByte ( )
- markReaderIndex ( )
- resetReaderIndex ( )
- readLong ( )
- readShort ( )
- getBytes ( )
- slice ( )
- writeIntLE ( )
- readSlice ( )
- writeFloatLE ( )
- writeCharSequence ( )
- writeZero ( )
- nioBuffer ( )
- writeShortLE ( )
- retain ( )
- readUnsignedInt ( )
- hasArray ( )
- writeLongLE ( )
- array ( )
- getUnsignedByte ( )
- readFloatLE ( )
- capacity ( )
- writeFloat ( )
- writeDouble ( )
- writeMedium ( )
- setInt ( )
- readDouble ( )
- readIntLE ( )
- forEachByte ( )
- clear ( )
- getInt ( )
- readUnsignedShortLE ( )
- copy ( )
- ensureWritable ( )
- readShortLE ( )
- readLongLE ( )
- order ( )
- arrayOffset ( )
- setByte ( )
- refCnt ( )
- internalNioBuffer ( )
- readFloat ( )
- nioBufferCount ( )
- getShort ( )
- readRetainedSlice ( )
- getLong ( )
- readUnsignedIntLE ( )
- resetWriterIndex ( )
- setBytes ( )
- writeMediumLE ( )
- indexOf ( )
- retainedSlice ( )
- retainedDuplicate ( )
- isWritable ( )
- readCharSequence ( )
- isDirect ( )
- bytesBefore ( )
- getUnsignedShort ( )
- duplicate ( )
- hasMemoryAddress ( )
- readUnsignedMediumLE ( )
- writableBytes ( )
- memoryAddress ( )
- markWriterIndex ( )
- discardReadBytes ( )
- nioBuffers ( )
- touch ( )
- setIntLE ( )
- getUnsignedMedium ( )
- getUnsignedInt ( )
- equals ( )
- setShort ( )
- writeChar ( )
- maxCapacity ( )
- setMediumLE ( )
- forEachByteDesc ( )
- getDouble ( )
- writeDoubleLE ( )
- getIntLE ( )
- readChar ( )
- getCharSequence ( )
- setLong ( )
- setShortLE ( )
- setIndex ( )
Related Classes
- java.util.Arrays
- java.util.Collections
- java.util.concurrent.TimeUnit
- java.util.UUID
- java.nio.charset.Charset
- java.net.URI
- java.nio.ByteBuffer
- org.junit.Assert
- java.util.Optional
- java.nio.charset.StandardCharsets
- java.net.InetSocketAddress
- java.util.concurrent.CountDownLatch
- com.google.common.collect.Lists
- org.mockito.Mockito
- java.util.concurrent.CompletableFuture
- com.google.common.base.Preconditions
- org.junit.jupiter.api.Test
- io.netty.channel.ChannelHandlerContext
- org.testng.annotations.Test
- io.netty.channel.Channel
- io.netty.buffer.Unpooled
- io.netty.channel.ChannelFuture
- io.netty.channel.ChannelFutureListener
- reactor.core.publisher.Mono
- reactor.core.publisher.Flux
Java Code Examples for io.netty.buffer.ByteBuf#readChar()
The following examples show how to use
io.netty.buffer.ByteBuf#readChar() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ReadPacket.java From vethrfolnir-mu with GNU General Public License v3.0 | 6 votes |
/** * This is only for LS <-> GS Communication, do not use it for clients! Unless overriden and managed * @param buff * @return */ protected String readS(ByteBuf buff) { try { ArrayList<Character> ins = new ArrayList<>(); char in; while(buff.isReadable() && (in = buff.readChar()) != '\000') { ins.add(in); } char[] arr = new char[ins.size()]; for (int i = 0; i < arr.length; i++) { arr[i] = ins.get(i); } String str = new String(arr); return str; } catch (Exception e) { log.warn("Failed reading string!", e); } return null; }
Example 2
Source File: Packet.java From Clither-Server with GNU General Public License v3.0 | 5 votes |
@SuppressWarnings("deprecation") public static String readUTF16(ByteBuf in) { in = in.order(ByteOrder.BIG_ENDIAN); ByteBuf buffer = in.alloc().buffer(); char chr; while (in.readableBytes() > 1 && (chr = in.readChar()) != 0) { buffer.writeChar(chr); } return buffer.toString(Charsets.UTF_16LE); }
Example 3
Source File: FWEntity.java From NOVA-Core with GNU Lesser General Public License v3.0 | 5 votes |
@Override public void readSpawnData(ByteBuf buffer) { //Load the client ID String id = ""; int length = buffer.readInt(); for (int i = 0; i < length; i++) id += buffer.readChar(); setWrapped(Game.entities().get(id).get().build()); }
Example 4
Source File: FWEntity.java From NOVA-Core with GNU Lesser General Public License v3.0 | 5 votes |
@Override public void readSpawnData(ByteBuf buffer) { //Load the client ID String id = ""; int length = buffer.readInt(); for (int i = 0; i < length; i++) id += buffer.readChar(); setWrapped(Game.entities().get(id).get().build()); }
Example 5
Source File: FWEntity.java From NOVA-Core with GNU Lesser General Public License v3.0 | 5 votes |
@Override public void readSpawnData(ByteBuf buffer) { //Load the client ID String id = ""; int length = buffer.readInt(); for (int i = 0; i < length; i++) id += buffer.readChar(); setWrapped(Game.entities().get(id).get().build()); }
Example 6
Source File: Packet.java From Ogar2-Server with GNU General Public License v3.0 | 5 votes |
public static String readUTF16(ByteBuf in) { in = in.order(ByteOrder.BIG_ENDIAN); ByteBuf buffer = in.alloc().buffer(); char chr; while (in.readableBytes() > 1 && (chr = in.readChar()) != 0) { buffer.writeChar(chr); } return buffer.toString(Charsets.UTF_16LE); }