1 4 package com.tc.bytes; 5 6 import com.tc.lang.Recyclable; 7 8 9 12 public interface TCByteBuffer extends Recyclable { 13 14 int capacity(); 18 19 TCByteBuffer clear(); 20 21 TCByteBuffer flip(); 22 23 boolean hasRemaining(); 24 25 boolean isReadOnly(); 26 27 int limit(); 28 29 TCByteBuffer limit(int newLimit); 30 31 int position(); 33 34 TCByteBuffer position(int newPosition); 35 36 int remaining(); 37 38 TCByteBuffer rewind(); 40 41 TCByteBuffer asReadOnlyBuffer(); 45 46 boolean isDirect(); 47 48 byte[] array(); 49 50 int arrayOffset(); 51 52 byte get(); 53 54 TCByteBuffer get(byte[] dst); 55 56 TCByteBuffer get(byte[] dst, int offset, int length); 57 58 byte get(int index); 59 60 boolean getBoolean(); 61 62 boolean getBoolean(int index); 63 64 char getChar(); 65 66 char getChar(int index); 67 68 double getDouble(); 69 70 double getDouble(int index); 71 72 float getFloat(); 73 74 float getFloat(int index); 75 76 int getInt(); 77 78 int getInt(int index); 79 80 long getLong(); 81 82 long getLong(int index); 83 84 short getShort(); 85 86 short getShort(int index); 87 88 TCByteBuffer put(byte[] src); 89 90 TCByteBuffer put(byte[] src, int offset, int length); 91 92 TCByteBuffer put(TCByteBuffer src); 93 94 TCByteBuffer put(byte b); 95 96 TCByteBuffer put(int index, byte b); 97 98 TCByteBuffer putBoolean(boolean b); 99 100 TCByteBuffer putBoolean(int index, boolean b); 101 102 TCByteBuffer putChar(char c); 103 104 TCByteBuffer putChar(int index, char c); 105 106 TCByteBuffer putFloat(float f); 107 108 TCByteBuffer putFloat(int index, float f); 109 110 TCByteBuffer putDouble(double d); 111 112 TCByteBuffer putDouble(int index, double d); 113 114 TCByteBuffer putInt(int i); 115 116 TCByteBuffer putInt(int index, int i); 117 118 TCByteBuffer putLong(long l); 119 120 TCByteBuffer putLong(int index, long l); 121 122 TCByteBuffer putShort(short s); 123 124 TCByteBuffer putShort(int index, short s); 125 126 TCByteBuffer duplicate(); 127 128 TCByteBuffer slice(); 129 130 boolean hasArray(); 131 132 136 boolean isNioBuffer(); 138 139 Object getNioBuffer(); 141 TCByteBuffer get(int index, byte[] dst); 143 144 TCByteBuffer get(int index, byte[] dst, int offset, int length); 145 146 TCByteBuffer put(int index, byte[] src); 147 148 TCByteBuffer put(int index, byte[] src, int offset, int length); 149 150 TCByteBuffer putUint(long i); 152 153 TCByteBuffer putUint(int index, long i); 154 155 TCByteBuffer putUshort(int s); 156 157 TCByteBuffer putUshort(int index, int s); 158 159 short getUbyte(); 161 162 short getUbyte(int index); 163 164 TCByteBuffer putUbyte(short value); 165 166 TCByteBuffer putUbyte(int index, short value); 167 168 long getUint(); 170 171 long getUint(int index); 172 173 int getUshort(); 174 175 int getUshort(int index); 176 177 } | Popular Tags |