Searched refs:bb (Results 1 - 25 of 234) sorted by relevance

12345678910

/openjdk7/jdk/test/java/nio/Buffer/
H A DAllocateDirectInit.java35 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 DOrder.java44 static void ckViews(ByteBuffer bb, ByteOrder ord) { argument
45 ck(bb.asCharBuffer().order(), bb.order());
46 ck(bb.asIntBuffer().order(), bb.order());
47 ck(bb.asLongBuffer().order(), bb.order());
48 ck(bb.asFloatBuffer().order(), bb.order());
49 ck(bb
52 ckByteBuffer(ByteBuffer bb) argument
[all...]
/openjdk7/jdk/src/share/classes/sun/jvmstat/perfdata/monitor/
H A DPerfByteArrayMonitor.java48 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 DPerfStringVariableMonitor.java47 * @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 DAbstractPerfDataBufferPrologue.java229 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...]
/openjdk7/jdk/src/share/classes/sun/security/ssl/
H A DByteBufferInputStream.java42 ByteBuffer bb; field in class:ByteBufferInputStream
44 ByteBufferInputStream(ByteBuffer bb) { argument
45 this.bb = bb;
55 if (bb == null) {
59 if (bb.remaining() == 0) {
62 return bb.get();
72 if (bb == null) {
86 if (bb == null) {
98 int length = Math.min(bb
[all...]
/openjdk7/langtools/test/tools/javac/T6356217/
H A DT6356217.java33 boolean bb; field in class:T
43 } while ((b ? t1 : t2).bb);
/openjdk7/jdk/test/sun/misc/Encode/
H A DGetBytes.java39 ByteBuffer bb = ByteBuffer.wrap(new byte [26 + 2]);
41 for (int i = 'a'; i < 'a' + bb.capacity(); i++) {
42 bb.put((byte)i);
48 bb.position(1);
49 bb.limit(bb.capacity() - 1);
51 ByteBuffer src = bb.slice();
/openjdk7/jdk/test/java/nio/charset/CharsetEncoder/
H A DFlush.java36 private static byte[] contents(ByteBuffer bb) { argument
37 byte[] contents = new byte[bb.position()];
38 ((ByteBuffer)(bb.duplicate().flip())).get(contents);
42 private static ByteBuffer extend(ByteBuffer bb) { argument
43 ByteBuffer x = ByteBuffer.allocate(2*bb.capacity()+10);
44 bb.flip();
45 x.put(bb);
56 ByteBuffer bb = ByteBuffer.allocate(6);
59 check(enc.encode(cb, bb, true).isUnderflow());
61 System.out.println(Arrays.toString(contents(bb)));
[all...]
/openjdk7/jdk/test/sun/nio/cs/
H A DEUCJPUnderflowDecodeTest.java36 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 DTestUTF_32.java109 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 DTestMiscEUC_JP.java46 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...]
/openjdk7/jdk/src/share/classes/sun/management/counter/perf/
H A DPerfByteArrayCounter.java34 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
/openjdk7/jdk/src/share/classes/sun/nio/ch/
H A DChannelInputStream.java47 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...]
/openjdk7/jdk/test/java/nio/channels/ServerSocketChannel/
H A DBasic.java68 ByteBuffer bb = ByteBuffer.allocateDirect(100);
69 if (sc.read(bb) != 1)
71 bb.flip();
72 byte b = bb.get();
74 bb.clear();
75 bb.put((byte)43);
76 bb.flip();
77 if (sc.write(bb) != 1)
107 ByteBuffer bb = ByteBuffer.allocateDirect(512);
108 bb
[all...]
/openjdk7/jdk/test/java/nio/channels/DatagramChannel/
H A DThereCanBeOnlyOne.java42 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 DEmptyBuffer.java50 ByteBuffer bb = ByteBuffer.allocateDirect(12);
51 bb.order(ByteOrder.BIG_ENDIAN);
52 bb.putInt(1).putLong(1);
53 bb.flip();
57 dc.write(bb);
58 bb.rewind();
59 dc.write(bb);
60 bb.rewind();
61 dc.write(bb);
87 void showBuffer(String s, ByteBuffer bb) { argument
[all...]
H A DConnect.java88 ByteBuffer bb = ByteBuffer.allocateDirect(256);
89 bb.put("hello".getBytes());
90 bb.flip();
97 dc.write(bb);
103 dc.send(bb, bogus);
110 bb.flip();
111 dc.read(bb);
112 bb.flip();
114 newDecoder().decode(bb);
146 ByteBuffer bb
[all...]
H A DReceive.java35 ByteBuffer bb = ByteBuffer.allocate(10);
39 dc1.receive(bb);
/openjdk7/jdk/test/java/nio/charset/coders/
H A DResetISO2022JP.java53 ByteBuffer bb = ByteBuffer.allocate(64);
54 e.encode(CharBuffer.wrap(s), bb, true);
55 e.flush(bb);
56 bb.flip();
58 for (int i = 0; i < bb.limit(); i++)
59 sb.append(String.format("%02x ", bb.get(i)));
/openjdk7/langtools/test/tools/javac/versions/
H A DCheckClassFileVersion.java32 ByteBuffer bb = ByteBuffer.allocate(1024);
35 bb.clear();
36 if (fc.read(bb) < 0)
38 bb.flip();
39 int minor = bb.getShort(4);
40 int major = bb.getShort(6);
/openjdk7/jdk/test/java/nio/charset/Charset/
H A DEncDec.java37 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();
/openjdk7/jdk/test/java/nio/charset/CharsetDecoder/
H A DEmptyInput.java36 ByteBuffer bb = ByteBuffer.allocate(10);
37 bb.flip();
40 cd.decode(bb, CharBuffer.allocate(10), true).throwException();
/openjdk7/jdk/src/share/classes/java/nio/
H A DBits.java66 static char getCharL(ByteBuffer bb, int bi) { argument
67 return makeChar(bb._get(bi + 1),
68 bb._get(bi ));
76 static char getCharB(ByteBuffer bb, int bi) { argument
77 return makeChar(bb._get(bi ),
78 bb._get(bi + 1));
86 static char getChar(ByteBuffer bb, int bi, boolean bigEndian) { argument
87 return bigEndian ? getCharB(bb, bi) : getCharL(bb, bi);
97 static void putCharL(ByteBuffer bb, in argument
107 putCharB(ByteBuffer bb, int bi, char x) argument
117 putChar(ByteBuffer bb, int bi, char x, boolean bigEndian) argument
138 getShortL(ByteBuffer bb, int bi) argument
148 getShortB(ByteBuffer bb, int bi) argument
158 getShort(ByteBuffer bb, int bi, boolean bigEndian) argument
169 putShortL(ByteBuffer bb, int bi, short x) argument
179 putShortB(ByteBuffer bb, int bi, short x) argument
189 putShort(ByteBuffer bb, int bi, short x, boolean bigEndian) argument
213 getIntL(ByteBuffer bb, int bi) argument
227 getIntB(ByteBuffer bb, int bi) argument
241 getInt(ByteBuffer bb, int bi, boolean bigEndian) argument
254 putIntL(ByteBuffer bb, int bi, int x) argument
268 putIntB(ByteBuffer bb, int bi, int x) argument
282 putInt(ByteBuffer bb, int bi, int x, boolean bigEndian) argument
312 getLongL(ByteBuffer bb, int bi) argument
334 getLongB(ByteBuffer bb, int bi) argument
356 getLong(ByteBuffer bb, int bi, boolean bigEndian) argument
373 putLongL(ByteBuffer bb, int bi, long x) argument
395 putLongB(ByteBuffer bb, int bi, long x) argument
417 putLong(ByteBuffer bb, int bi, long x, boolean bigEndian) argument
434 getFloatL(ByteBuffer bb, int bi) argument
442 getFloatB(ByteBuffer bb, int bi) argument
450 getFloat(ByteBuffer bb, int bi, boolean bigEndian) argument
458 putFloatL(ByteBuffer bb, int bi, float x) argument
466 putFloatB(ByteBuffer bb, int bi, float x) argument
474 putFloat(ByteBuffer bb, int bi, float x, boolean bigEndian) argument
491 getDoubleL(ByteBuffer bb, int bi) argument
499 getDoubleB(ByteBuffer bb, int bi) argument
507 getDouble(ByteBuffer bb, int bi, boolean bigEndian) argument
515 putDoubleL(ByteBuffer bb, int bi, double x) argument
523 putDoubleB(ByteBuffer bb, int bi, double x) argument
531 putDouble(ByteBuffer bb, int bi, double x, boolean bigEndian) argument
[all...]
/openjdk7/jdk/test/java/nio/channels/SocketChannel/
H A DOutOfBand.java77 ByteBuffer bb = ByteBuffer.allocate(100);
82 bb.clear();
83 if (server.read(bb) != 1)
85 bb.flip();
86 byte b2 = bb.get();
113 ByteBuffer bb = ByteBuffer.allocate(256);
114 while (bb.hasRemaining()) {
115 if (server.read(bb) < 0)
118 bb.flip();
120 while (bb
[all...]

Completed in 186 milliseconds

12345678910