Searched defs:bb (Results 1 - 22 of 22) sorted by relevance

/libcore/ojluni/src/main/java/sun/nio/ch/
H A DChannelInputStream.java53 public static int read(ReadableByteChannel ch, ByteBuffer bb) argument
65 int n = ch.read(bb);
72 return ch.read(bb);
77 private ByteBuffer bb = null; field in class:ChannelInputStream
103 ByteBuffer bb = ((this.bs == bs)
104 ? this.bb
106 bb.limit(Math.min(off + len, bb.capacity()));
107 bb.position(off);
108 this.bb
113 read(ByteBuffer bb) argument
[all...]
H A DIOUtil.java58 ByteBuffer bb = Util.getTemporaryDirectBuffer(rem);
60 bb.put(src);
61 bb.flip();
65 int n = writeFromNativeBuffer(fd, bb, position, nd);
72 Util.offerFirstTemporaryDirectBuffer(bb);
76 private static int writeFromNativeBuffer(FileDescriptor fd, ByteBuffer bb, argument
80 int pos = bb.position();
81 int lim = bb.limit();
90 ((DirectBuffer)bb).address() + pos,
93 written = nd.write(fd, ((DirectBuffer)bb)
207 readIntoNativeBuffer(FileDescriptor fd, ByteBuffer bb, long position, NativeDispatcher nd) argument
[all...]
H A DDatagramSocketAdaptor.java145 ByteBuffer bb = ByteBuffer.wrap(p.getData(),
156 dc.write(bb);
159 dc.send(bb, p.getSocketAddress());
163 dc.send(bb, p.getSocketAddress());
174 private SocketAddress receive(ByteBuffer bb) throws IOException { argument
176 return dc.receive(bb);
183 if ((sender = dc.receive(bb)) != null)
193 if ((sender = dc.receive(bb)) != null)
213 ByteBuffer bb = ByteBuffer.wrap(p.getData(),
216 SocketAddress sender = receive(bb);
[all...]
H A DSocketAdaptor.java200 protected int read(ByteBuffer bb) argument
207 return sc.read(bb);
212 if ((n = sc.read(bb)) != 0)
221 if ((n = sc.read(bb)) != 0)
H A DUtil.java91 ByteBuffer bb = buffers[i];
92 if (bb == null)
94 if (bb.capacity() >= size) {
95 buf = bb;
279 static void erase(ByteBuffer bb) { argument
280 unsafe.setMemory(((DirectBuffer)bb).address(), bb.capacity(), (byte)0);
H A DDatagramChannelImpl.java384 ByteBuffer bb = null;
398 bb = Util.getTemporaryDirectBuffer(dst.remaining());
401 n = receive(fd, bb);
412 bb.clear();
416 bb.flip();
417 dst.put(bb);
423 if (bb != null)
424 Util.releaseTemporaryDirectBuffer(bb);
446 ByteBuffer bb = Util.getTemporaryDirectBuffer(newSize);
450 int n = receiveIntoNativeBuffer(fd, bb, newSiz
460 receiveIntoNativeBuffer(FileDescriptor fd, ByteBuffer bb, int rem, int pos) argument
561 sendFromNativeBuffer(FileDescriptor fd, ByteBuffer bb, InetSocketAddress target) argument
[all...]
H A DFileChannelImpl.java593 ByteBuffer bb = Util.getTemporaryDirectBuffer(c);
597 Util.erase(bb);
599 bb.limit(Math.min((int)(icount - tw), TRANSFER_SIZE));
600 int nr = read(bb, pos);
603 bb.flip();
606 int nw = target.write(bb);
611 bb.clear();
619 Util.releaseTemporaryDirectBuffer(bb);
673 MappedByteBuffer bb = src.map(MapMode.READ_ONLY, p, size);
675 long n = write(bb, positio
885 unmap(MappedByteBuffer bb) argument
[all...]
/libcore/ojluni/src/main/java/java/nio/
H A DByteBufferAsDoubleBuffer.java33 protected final ByteBuffer bb; field in class:ByteBufferAsDoubleBuffer
37 ByteBufferAsDoubleBuffer(ByteBuffer bb, argument
41 this.bb = bb.duplicate();
42 this.isReadOnly = bb.isReadOnly;
43 // There are only two possibilities for the type of ByteBuffer "bb", viz, DirectByteBuffer and
44 // HeapByteBuffer. We only have to initialize the field when bb is an instance of
50 if (bb instanceof DirectByteBuffer) {
51 this.address = bb.address + off;
53 this.bb
[all...]
H A DByteBufferAsFloatBuffer.java32 protected final ByteBuffer bb; field in class:ByteBufferAsFloatBuffer
36 ByteBufferAsFloatBuffer(ByteBuffer bb, argument
40 this.bb = bb.duplicate();
41 this.isReadOnly = bb.isReadOnly;
42 // There are only two possibilities for the type of ByteBuffer "bb", viz, DirectByteBuffer and
43 // HeapByteBuffer. We only have to initialize the field when bb is an instance of
49 if (bb instanceof DirectByteBuffer) {
50 this.address = bb.address + off;
52 this.bb
[all...]
H A DByteBufferAsIntBuffer.java32 protected final ByteBuffer bb; field in class:ByteBufferAsIntBuffer
36 ByteBufferAsIntBuffer(ByteBuffer bb, argument
40 this.bb = bb.duplicate();
41 this.isReadOnly = bb.isReadOnly;
42 // There are only two possibilities for the type of ByteBuffer "bb", viz, DirectByteBuffer and
43 // HeapByteBuffer. We only have to initialize the field when bb is an instance of
49 if (bb instanceof DirectByteBuffer) {
50 this.address = bb.address + off;
52 this.bb
[all...]
H A DByteBufferAsLongBuffer.java32 protected final ByteBuffer bb; field in class:ByteBufferAsLongBuffer
36 ByteBufferAsLongBuffer(ByteBuffer bb, argument
40 this.bb = bb.duplicate();
41 this.isReadOnly = bb.isReadOnly;
42 // There are only two possibilities for the type of ByteBuffer "bb", viz, DirectByteBuffer and
43 // HeapByteBuffer. We only have to initialize the field when bb is an instance of
49 if (bb instanceof DirectByteBuffer) {
50 this.address = bb.address + off;
52 this.bb
[all...]
H A DByteBufferAsShortBuffer.java32 protected final ByteBuffer bb; field in class:ByteBufferAsShortBuffer
36 ByteBufferAsShortBuffer(ByteBuffer bb, argument
40 this.bb = bb.duplicate();
41 this.isReadOnly = bb.isReadOnly;
42 // There are only two possibilities for the type of ByteBuffer "bb", viz, DirectByteBuffer and
43 // HeapByteBuffer. We only have to initialize the field when bb is an instance of
49 if (bb instanceof DirectByteBuffer) {
50 this.address = bb.address + off;
52 this.bb
[all...]
H A DByteBufferAsCharBuffer.java32 protected final ByteBuffer bb; field in class:ByteBufferAsCharBuffer
36 ByteBufferAsCharBuffer(ByteBuffer bb, argument
40 this.bb = bb.duplicate();
41 this.isReadOnly = bb.isReadOnly;
42 // There are only two possibilities for the type of ByteBuffer "bb", viz, DirectByteBuffer and
43 // HeapByteBuffer. We only have to initialize the field when bb is an instance of
49 if (bb instanceof DirectByteBuffer) {
50 this.address = bb.address + off;
52 this.bb
[all...]
H A DBits.java68 static char getCharL(ByteBuffer bb, int bi) { argument
69 return makeChar(bb._get(bi + 1),
70 bb._get(bi ));
78 static char getCharB(ByteBuffer bb, int bi) { argument
79 return makeChar(bb._get(bi ),
80 bb._get(bi + 1));
88 static char getChar(ByteBuffer bb, int bi, boolean bigEndian) { argument
89 return bigEndian ? getCharB(bb, bi) : getCharL(bb, bi);
99 static void putCharL(ByteBuffer bb, in argument
109 putCharB(ByteBuffer bb, int bi, char x) argument
119 putChar(ByteBuffer bb, int bi, char x, boolean bigEndian) argument
140 getShortL(ByteBuffer bb, int bi) argument
150 getShortB(ByteBuffer bb, int bi) argument
160 getShort(ByteBuffer bb, int bi, boolean bigEndian) argument
171 putShortL(ByteBuffer bb, int bi, short x) argument
181 putShortB(ByteBuffer bb, int bi, short x) argument
191 putShort(ByteBuffer bb, int bi, short x, boolean bigEndian) argument
215 getIntL(ByteBuffer bb, int bi) argument
229 getIntB(ByteBuffer bb, int bi) argument
243 getInt(ByteBuffer bb, int bi, boolean bigEndian) argument
256 putIntL(ByteBuffer bb, int bi, int x) argument
270 putIntB(ByteBuffer bb, int bi, int x) argument
284 putInt(ByteBuffer bb, int bi, int x, boolean bigEndian) argument
314 getLongL(ByteBuffer bb, int bi) argument
336 getLongB(ByteBuffer bb, int bi) argument
358 getLong(ByteBuffer bb, int bi, boolean bigEndian) argument
375 putLongL(ByteBuffer bb, int bi, long x) argument
397 putLongB(ByteBuffer bb, int bi, long x) argument
419 putLong(ByteBuffer bb, int bi, long x, boolean bigEndian) argument
436 getFloatL(ByteBuffer bb, int bi) argument
444 getFloatB(ByteBuffer bb, int bi) argument
452 getFloat(ByteBuffer bb, int bi, boolean bigEndian) argument
460 putFloatL(ByteBuffer bb, int bi, float x) argument
468 putFloatB(ByteBuffer bb, int bi, float x) argument
476 putFloat(ByteBuffer bb, int bi, float x, boolean bigEndian) argument
493 getDoubleL(ByteBuffer bb, int bi) argument
501 getDoubleB(ByteBuffer bb, int bi) argument
509 getDouble(ByteBuffer bb, int bi, boolean bigEndian) argument
517 putDoubleL(ByteBuffer bb, int bi, double x) argument
525 putDoubleB(ByteBuffer bb, int bi, double x) argument
533 putDouble(ByteBuffer bb, int bi, double x, boolean bigEndian) argument
[all...]
/libcore/ojluni/src/main/java/sun/misc/
H A DCharacterEncoder.java210 private byte [] getBytes(ByteBuffer bb) { argument
221 if (bb.hasArray()) {
222 byte [] tmp = bb.array();
223 if ((tmp.length == bb.capacity()) &&
224 (tmp.length == bb.remaining())) {
226 bb.position(bb.limit());
236 buf = new byte[bb.remaining()];
241 bb.get(buf);
/libcore/luni/src/test/java/libcore/java/nio/charset/
H A DCharset_TestGenerator.java223 ByteBuffer bb = encoder.encode(cb);
224 // bb.rewind();
225 while (bb.hasRemaining()) {
226 out.consume(bb.get());
234 static void genDecoded (Charset charset, ByteBuffer bb) { argument
/libcore/ojluni/src/main/java/java/nio/channels/
H A DChannels.java75 private static void writeFullyImpl(WritableByteChannel ch, ByteBuffer bb) argument
78 while (bb.remaining() > 0) {
79 int n = ch.write(bb);
91 private static void writeFully(WritableByteChannel ch, ByteBuffer bb) argument
99 writeFullyImpl(ch, bb);
102 writeFullyImpl(ch, bb);
148 private ByteBuffer bb = null;
168 ByteBuffer bb = ((this.bs == bs)
169 ? this.bb
171 bb
[all...]
/libcore/ojluni/src/main/java/java/nio/charset/
H A DCharset.java837 * .decode(bb); </pre>
847 * @param bb The byte buffer to be decoded
851 public final CharBuffer decode(ByteBuffer bb) { argument
856 .decode(bb);
873 * .encode(bb); </pre>
/libcore/ojluni/src/main/java/java/util/
H A DBitSet.java255 * <br>{@code BitSet.valueOf(bb).get(n) == ((bb.get(bb.position()+n/8) & (1<<(n%8))) != 0)}
256 * <br>for all {@code n < 8 * bb.remaining()}.
261 * @param bb a byte buffer containing a little-endian representation
268 public static BitSet valueOf(ByteBuffer bb) { argument
269 bb = bb.slice().order(ByteOrder.LITTLE_ENDIAN);
271 for (n = bb.remaining(); n > 0 && bb
[all...]
/libcore/ojluni/src/main/java/sun/nio/cs/
H A DStreamDecoder.java226 private ByteBuffer bb; field in class:StreamDecoder
248 bb = ByteBuffer.allocateDirect(DEFAULT_BYTE_BUFFER_SIZE);
253 bb = ByteBuffer.allocate(DEFAULT_BYTE_BUFFER_SIZE);
255 bb.flip(); // So that bb is initially empty
263 this.bb = ByteBuffer.allocate(mbc < 0
268 bb.flip();
272 bb.compact();
278 int n = sun.nio.ch.ChannelInputStream.read(ch, bb);
283 int lim = bb
[all...]
H A DStreamEncoder.java163 private ByteBuffer bb; field in class:StreamEncoder
192 bb = ByteBuffer.allocateDirect(DEFAULT_BYTE_BUFFER_SIZE);
195 bb = ByteBuffer.allocate(DEFAULT_BYTE_BUFFER_SIZE);
204 this.bb = ByteBuffer.allocate(mbc < 0
210 bb.flip();
211 int lim = bb.limit();
212 int pos = bb.position();
218 if (ch.write(bb) != rem)
221 out.write(bb.array(), bb
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
H A DEnumSetTest.java44 a, b,c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, aa, bb, cc, dd, ee, ff, gg, hh, ii, jj, kk, ll, enum constant in enum:EnumSetTest.EnumFoo
52 a{}, b{}, c{}, d{}, e{}, f{}, g{}, h{}, i{}, j{}, k{}, l{}, m{}, n{}, o{}, p{}, q{}, r{}, s{}, t{}, u{}, v{}, w{}, x{}, y{}, z{}, A{}, B{}, C{}, D{}, E{}, F{}, G{}, H{}, I{}, J{}, K{}, L{}, M{}, N{}, O{}, P{}, Q{}, R{}, S{}, T{}, U{}, V{}, W{}, X{}, Y{}, Z{}, aa{}, bb{}, cc{}, dd{}, ee{}, ff{}, gg{}, hh{}, ii{}, jj{}, kk{}, ll{}, mm{}, enum constant in enum:EnumSetTest.HugeEnumWithInnerClass
56 a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, aa, bb, cc, dd, ee, ff, gg, hh, ii, jj, kk, ll, mm, enum constant in enum:EnumSetTest.HugeEnum
616 hugeSet.add(HugeEnum.bb);
699 set.add(EnumFoo.bb);
821 hugeSet.add(HugeEnum.bb);

Completed in 274 milliseconds