/openjdk10/jdk/test/java/nio/Buffer/ |
H A D | AllocateDirectInit.java | 35 ByteBuffer bb = ByteBuffer.allocateDirect(1024); 36 // printByteBuffer(bb); 37 for (bb.position(0); bb.position() < bb.limit(); ) { 38 if ((bb.get() & 0xff) != 0) 40 + bb.position()); 45 private static void printByteBuffer(ByteBuffer bb) { argument 47 for (bb.position(0); bb [all...] |
H A D | Order.java | 45 private static void ckViews(ByteBuffer bb) { argument 46 ck(bb.asCharBuffer().order(), bb.order()); 47 ck(bb.asShortBuffer().order(), bb.order()); 48 ck(bb.asIntBuffer().order(), bb.order()); 49 ck(bb.asLongBuffer().order(), bb.order()); 50 ck(bb 54 ckCopyViews(ByteBuffer bb) argument 60 ckByteBuffer(ByteBuffer bb) argument [all...] |
H A D | ByteBufferViews.java | 97 (ByteBuffer bb) -> bb.order(ByteOrder.BIG_ENDIAN)), 99 (ByteBuffer bb) -> bb.order(ByteOrder.LITTLE_ENDIAN)) 132 static void assertValues(int i, Object bValue, Object bbValue, ByteBuffer bb) { argument 135 bValue, bbValue, i, bb)); 139 static void assertValues(int i, Object bbValue, Object bvValue, ByteBuffer bb, Buffer bv) { argument 142 bbValue, bvValue, i, bb, bv)); 154 static ByteBuffer fill(ByteBuffer bb, IntUnaryOperator o) { argument 155 for (int i = 0; i < bb 249 getShortFromBytes(ByteBuffer bb, int i) argument 348 getCharFromBytes(ByteBuffer bb, int i) argument 440 getIntFromBytes(ByteBuffer bb, int i) argument 542 getLongFromBytes(ByteBuffer bb, int i) argument 650 getFloatFromBytes(ByteBuffer bb, int i) argument 743 getDoubleFromBytes(ByteBuffer bb, int i) argument [all...] |
/openjdk10/jdk/src/jdk.internal.jvmstat/share/classes/sun/jvmstat/perfdata/monitor/ |
H A D | PerfByteArrayMonitor.java | 48 ByteBuffer bb; field in class:PerfByteArrayMonitor 58 * @param bb the buffer containing the byte array instrument data 62 boolean supported, ByteBuffer bb, 65 this.bb = bb; 88 bb.position(0); 89 byte[] b = new byte[bb.limit()]; 92 bb.get(b); 104 bb.position(index); 105 return bb 61 PerfByteArrayMonitor(String name, Units u, Variability v, boolean supported, ByteBuffer bb, int vectorLength) argument [all...] |
H A D | PerfStringVariableMonitor.java | 47 * @param bb the buffer containing the string instrument data. 50 ByteBuffer bb) { 51 this(name, supported, bb, bb.limit()); 59 * @param bb the buffer containing the string instrument data. 64 ByteBuffer bb, int maxLength) { 66 super(name, Variability.VARIABLE, supported, bb, maxLength+1); 49 PerfStringVariableMonitor(String name, boolean supported, ByteBuffer bb) argument 63 PerfStringVariableMonitor(String name, boolean supported, ByteBuffer bb, int maxLength) argument
|
H A D | AbstractPerfDataBufferPrologue.java | 229 public static int getMagic(ByteBuffer bb) { argument 231 int position = bb.position(); 232 ByteOrder order = bb.order(); 235 bb.order(ByteOrder.BIG_ENDIAN); 236 bb.position(PERFDATA_PROLOG_MAGIC_OFFSET); 237 int magic = bb.getInt(); 240 bb.order(order); 241 bb.position(position); 251 public static int getMajorVersion(ByteBuffer bb) { argument 253 int position = bb 269 getMinorVersion(ByteBuffer bb) argument 287 getByteOrder(ByteBuffer bb) argument [all...] |
/openjdk10/jdk/src/java.base/share/classes/sun/security/ssl/ |
H A D | ByteBufferInputStream.java | 42 ByteBuffer bb; field in class:ByteBufferInputStream 44 ByteBufferInputStream(ByteBuffer bb) { argument 45 this.bb = bb; 56 if (bb == null) { 60 if (bb.remaining() == 0) { 64 return (bb.get() & 0xFF); // need to be in the range 0 to 255 75 if (bb == null) { 90 if (bb == null) { 102 int length = Math.min(bb [all...] |
/openjdk10/langtools/test/tools/javac/T6356217/ |
H A D | T6356217.java | 33 boolean bb; field in class:T 43 } while ((b ? t1 : t2).bb);
|
/openjdk10/jdk/test/java/nio/charset/CharsetEncoder/ |
H A D | Flush.java | 37 private static byte[] contents(ByteBuffer bb) { argument 38 byte[] contents = new byte[bb.position()]; 39 bb.duplicate().flip().get(contents); 43 private static ByteBuffer extend(ByteBuffer bb) { argument 44 ByteBuffer x = ByteBuffer.allocate(2*bb.capacity()+10); 45 bb.flip(); 46 x.put(bb); 57 ByteBuffer bb = ByteBuffer.allocate(6); 60 check(enc.encode(cb, bb, true).isUnderflow()); 62 System.out.println(Arrays.toString(contents(bb))); [all...] |
/openjdk10/jdk/test/sun/nio/cs/ |
H A D | EUCJPUnderflowDecodeTest.java | 36 ByteBuffer bb = ByteBuffer.allocateDirect(255); 47 bb.clear(); 52 bb.put((byte)0x8f); 53 bb.put((byte)0xa2); 54 bb.flip(); 59 CoderResult result = decoder.decode(bb, cc, false); 73 bb.clear(); 75 bb.put((byte)0xa1); 76 bb.flip(); 77 result = decoder.decode(bb, c [all...] |
H A D | TestUTF_32.java | 109 byte[] bb = baos.toByteArray(); 111 return bb; 115 byte[] bb; 119 bb = getBytes(false, true); 120 s = new String(bb, "UTF-32"); 121 testDecode("UTF_32", s, bb); 122 testEncode("UTF_32", s, bb); 126 bb = getBytes(true, false); 127 s = new String(bb, "UTF-32"); 128 bb [all...] |
H A D | TestEBCDICLineFeed.java | 47 byte[] bb = "\n".getBytes(cs); 48 if (bb.length != 1 || bb[0] != 0x15) { 50 cs, bb[0] & 0xff); 53 bb = "\u0085".getBytes(cs); 54 if (bb.length != 1 || bb[0] != 0x15) { 56 cs, bb[0] & 0xff);
|
H A D | TestMiscEUC_JP.java | 46 ByteBuffer bb = enc.encode(cb); 48 if (!((bb.limit() == 3) 49 && (bb.get() == euc[0]) 50 && (bb.get() == euc[1]) 51 && (bb.get() == euc[2]))) { 53 bb.flip(); 56 + Integer.toHexString(bb.limit()) + " 0x" 57 + Integer.toHexString((int)bb.get() & 0xff) + " " 58 + Integer.toHexString((int)bb.get() & 0xff) + " " 59 + Integer.toHexString((int)bb [all...] |
/openjdk10/jdk/src/java.management/share/classes/sun/management/counter/perf/ |
H A D | PerfByteArrayCounter.java | 34 ByteBuffer bb; field in class:PerfByteArrayCounter 38 ByteBuffer bb) { 41 this.bb = bb; 53 bb.position(0); 54 byte[] b = new byte[bb.limit()]; 57 bb.get(b); 66 bb.position(index); 67 return bb.get(); 36 PerfByteArrayCounter(String name, Units u, Variability v, int flags, int vectorLength, ByteBuffer bb) argument
|
/openjdk10/nashorn/samples/ |
H A D | jsobject.js | 49 var bb = new BufferArray(10); 53 var len = bb.length; 54 print("bb.length = " + len) 56 bb[i] = i*i; 60 print(bb[i]); 67 print(typeof bb.buf); 68 var buf = bb.buf();
|
/openjdk10/jdk/src/java.base/share/classes/sun/nio/ch/ |
H A D | ChannelInputStream.java | 47 public static int read(ReadableByteChannel ch, ByteBuffer bb, argument 59 int n = ch.read(bb); 65 return ch.read(bb); 70 private ByteBuffer bb = null; field in class:ChannelInputStream 96 ByteBuffer bb = ((this.bs == bs) 97 ? this.bb 99 bb.limit(Math.min(off + len, bb.capacity())); 100 bb.position(off); 101 this.bb 106 read(ByteBuffer bb) argument [all...] |
/openjdk10/jdk/test/java/nio/channels/ServerSocketChannel/ |
H A D | Basic.java | 69 ByteBuffer bb = ByteBuffer.allocateDirect(100); 70 if (sc.read(bb) != 1) 72 bb.flip(); 73 byte b = bb.get(); 75 bb.clear(); 76 bb.put((byte)43); 77 bb.flip(); 78 if (sc.write(bb) != 1) 108 ByteBuffer bb = ByteBuffer.allocateDirect(512); 109 bb [all...] |
/openjdk10/jdk/src/java.base/share/classes/sun/text/ |
H A D | BreakDictionary.java | 148 ByteBuffer bb = ByteBuffer.wrap(dictionaryData); 151 int version = bb.getInt(); 158 int len = bb.getInt(); 159 if (bb.position() + len != bb.limit()) { 160 throw new MissingResourceException("Dictionary size is wrong: " + bb.limit(), 166 len = bb.getInt(); 169 temp[i] = bb.getShort(); 171 len = bb.getInt(); 173 bb [all...] |
/openjdk10/jdk/test/java/nio/channels/DatagramChannel/ |
H A D | ThereCanBeOnlyOne.java | 42 ByteBuffer bb = ByteBuffer.allocateDirect(512); 43 bb.put("hello".getBytes()); 44 bb.flip(); 52 bb.rewind(); 53 dc1.write(bb); 83 bb.rewind(); 84 dc1.write(bb); 86 bb.clear(); 87 dc1.receive(bb); 99 dc1.receive(bb); [all...] |
H A D | EmptyBuffer.java | 61 ByteBuffer bb = ByteBuffer.allocateDirect(12); 62 bb.order(ByteOrder.BIG_ENDIAN); 63 bb.putInt(1).putLong(1); 64 bb.flip(); 66 dc.write(bb); 67 bb.rewind(); 68 dc.write(bb); 69 bb.rewind(); 70 dc.write(bb); 100 void showBuffer(String s, ByteBuffer bb) { argument [all...] |
H A D | Sender.java | 81 ByteBuffer bb = ByteBuffer.allocateDirect(12); 82 bb.order(ByteOrder.BIG_ENDIAN); 83 bb.putInt(1).putLong(1); 84 bb.flip(); 89 dc.write(bb); 113 void showBuffer(String s, ByteBuffer bb) { argument 115 bb.rewind(); 116 for (int i=0; i<bb.limit(); i++) { 117 byte element = bb.get(); 128 ByteBuffer bb [all...] |
/openjdk10/jdk/test/java/nio/charset/coders/ |
H A D | ResetISO2022JP.java | 54 ByteBuffer bb = ByteBuffer.allocate(64); 55 e.encode(CharBuffer.wrap(s), bb, true); 56 e.flush(bb); 57 bb.flip(); 59 for (int i = 0; i < bb.limit(); i++) 60 sb.append(String.format("%02x ", bb.get(i)));
|
/openjdk10/jdk/test/java/util/zip/ |
H A D | ChecksumBase.java | 67 ByteBuffer bb = ByteBuffer.wrap(BYTES_123456789); 68 checksum.update(bb); 74 ByteBuffer bb = ByteBuffer.wrap(BYTES_123456789).asReadOnlyBuffer(); 75 checksum.update(bb); 81 ByteBuffer bb = ByteBuffer.allocateDirect(BYTES_123456789.length); 82 bb.put(BYTES_123456789); 83 bb.rewind(); 84 checksum.update(bb); 110 ByteBuffer bb = ByteBuffer.allocateDirect(unaligned_bytes_123456789.length); 112 bb [all...] |
/openjdk10/jdk/test/java/nio/charset/Charset/ |
H A D | EncDec.java | 37 ByteBuffer bb = ByteBuffer.allocate(100); 38 bb.put(Charset.forName("ISO-8859-15").encode(s)).flip(); 39 String t = Charset.forName("UTF-8").decode(bb).toString();
|
/openjdk10/jdk/test/java/nio/charset/CharsetDecoder/ |
H A D | EmptyInput.java | 36 ByteBuffer bb = ByteBuffer.allocate(10); 37 bb.flip(); 40 cd.decode(bb, CharBuffer.allocate(10), true).throwException();
|