Searched defs:ba (Results 1 - 25 of 39) sorted by relevance

12

/openjdk7/jdk/test/java/nio/charset/RemovingSunIO/
H A DTestUnmappableForLength.java35 byte[] ba = {(byte)0xa2, (byte)0xff};
37 testDecode("EUC_TW", ba, 2);
40 testDecode("EUC_CN", ba, 2);
43 static void testDecode(String csName, byte[] ba, int expected) argument
50 .decode(ByteBuffer.wrap(ba), CharBuffer.allocate(4), true);
/openjdk7/jdk/test/sun/nio/cs/
H A DFindASCIICodingBugs.java44 private static boolean equals(byte[] ba, ByteBuffer bb) { argument
45 if (ba.length != bb.limit())
47 for (int i = 0; i < ba.length; i++)
48 if (ba[i] != bb.get(i))
H A DTestStringCodingUTF8.java75 byte[] ba = new byte[rnd.nextInt(maxlen)];
76 rnd.nextBytes(ba);
78 if (!new String(ba, cs.name()).equals(
79 new String(decode(cs, ba, 0, ba.length))))
82 if (!new String(ba, cs).equals(
83 new String(decode(cs, ba, 0, ba.length))))
91 byte[] ba = encode(cs, ca, off, len);
95 if (!Arrays.equals(ba, baSt
113 decode(Charset cs, byte[] ba, int off, int len) argument
[all...]
/openjdk7/hotspot/test/compiler/8000805/
H A DTest8000805.java45 static long loadB2L_mask8 (byte[] ba) { return ba[0] & 0x55; } argument
46 static long loadB2L_mask8_1 (byte[] ba) { return ba[0] & 0x55; } argument
50 byte[] ba = new byte[] { (byte) i};
52 { long v1 = loadB2L_mask8(ba);
53 long v2 = loadB2L_mask8_1(ba);
/openjdk7/jdk/make/tools/src/build/tools/charsetmapping/
H A DEUC_TW.java52 static char[] toCharArray(byte[] ba, argument
61 ca[off++] = (char)(((ba[b1 * 256 + b2++] & 0xff) << 8) |
62 (ba[b1 * 256 + b2++] & 0xff));
/openjdk7/jdk/test/java/nio/charset/coders/
H A DIsLegalReplacement.java40 static String toString(byte[] ba) { argument
42 for (int i = 0; i < ba.length; i++) {
43 byte b = ba[i];
H A DUtil.java31 public static int cmp(byte[] ba, byte[] bb) { argument
32 int n = Math.min(ba.length, bb.length);
34 if ((i >= ba.length) || (i >= bb.length))
36 if (ba[i] != bb[i])
39 if (ba.length != bb.length)
59 public static String toString(byte[] ba, int off, int len) { argument
62 int c = ba[i];
77 public static String toString(byte[] ba) { argument
78 return toString(ba, 0, ba
[all...]
H A DCheck.java72 byte[] ba = new byte[nb];
74 ba[i] = (byte)Integer.parseInt(v.substring(i << 1, (i << 1) + 2),
77 bytes[c] = ba;
98 private void mismatch(int i, byte[] ba, String expected, String got) { argument
102 + Util.toString(ba)
120 byte[] ba = s.getBytes(csName);
121 if (Util.cmp(ba, bytes[i]) >= 0)
122 mismatch(s, bytes[i], ba);
126 // String(byte[] ba, String csn)
135 log.println("String(byte[] ba, \""
[all...]
H A DErrors.java60 byte[] ba = null;
62 ba = enc(s);
68 log.println(" -e-> " + Util.toString(ba));
69 int i = Util.cmp(ba, ref);
78 abstract String dec(byte[] ba) throws IOException; argument
80 Test test(byte[] ba, String ref) { argument
81 log.print(" " + Util.toString(ba));
84 s = dec(ba);
131 String dec(byte[] ba) throws IOException { argument
132 ByteArrayInputStream bis = new ByteArrayInputStream(ba);
153 dec(byte[] ba) argument
[all...]
/openjdk7/jdk/src/share/classes/sun/net/www/http/
H A DHttpCaptureOutputStream.java50 public void write(byte[] ba) throws IOException { argument
51 for (byte b : ba) {
54 out.write(ba);
/openjdk7/hotspot/test/compiler/5057225/
H A DTest5057225.java35 static byte[] ba = new byte[] { -1 }; field in class:Test5057225
109 public void run() { check(doload(ba), MASK); }
110 static long doload(byte[] ba) { return ba[0] & MASK; } argument
/openjdk7/jaxws/src/share/jaxws_classes/com/sun/xml/internal/messaging/saaj/packaging/mime/util/
H A DQPDecoderStream.java46 protected byte[] ba = new byte[2]; field in class:QPDecoderStream
119 ba[0] = (byte)a;
120 ba[1] = (byte)in.read();
122 return ASCIIUtility.parseInt(ba, 0, 2, 16);
127 ASCIIUtility.toString(ba, 0, 2)
131 ((PushbackInputStream)in).unread(ba);
/openjdk7/jdk/src/share/classes/java/util/zip/
H A DZipCoder.java46 String toString(byte[] ba, int length) { argument
56 int clen = ((ArrayDecoder)cd).decode(ba, 0, length, ca);
61 ByteBuffer bb = ByteBuffer.wrap(ba, 0, length);
72 String toString(byte[] ba) { argument
73 return toString(ba, ba.length);
80 byte[] ba = new byte[len];
82 return ba;
86 int blen = ((ArrayEncoder)ce).encode(ca, 0, ca.length, ba);
89 return Arrays.copyOf(ba, ble
115 toStringUTF8(byte[] ba, int len) argument
[all...]
/openjdk7/hotspot/test/compiler/6797305/
H A DTest6797305.java33 static final byte[] ba = new byte[] { -1 }; field in class:Test6797305
40 long b = loadB(ba);
44 long b2l = loadB2L(ba);
48 int ub = loadUB(ba);
52 int ubmask = loadUBmask(ba);
56 long ub2l = loadUB2L(ba);
97 static int loadB (byte[] ba) { return ba[0]; } argument
98 static long loadB2L (byte[] ba) { return ba[ argument
99 loadUB(byte[] ba) argument
100 loadUBmask(byte[] ba) argument
101 loadUB2L(byte[] ba) argument
[all...]
/openjdk7/jdk/src/share/demo/nio/zipfs/src/com/sun/nio/zipfs/
H A DZipCoder.java60 String toString(byte[] ba, int length) { argument
66 ByteBuffer bb = ByteBuffer.wrap(ba, 0, length);
77 String toString(byte[] ba) { argument
78 return toString(ba, ba.length);
85 byte[] ba = new byte[len];
87 return ba;
88 ByteBuffer bb = ByteBuffer.wrap(ba);
96 if (bb.position() == ba.length) // defensive copy?
97 return ba;
111 toStringUTF8(byte[] ba, int len) argument
[all...]
/openjdk7/jdk/src/share/classes/sun/security/util/
H A DBitArray.java119 private BitArray(BitArray ba) { argument
120 length = ba.length;
121 repn = ba.repn.clone();
177 BitArray ba = (BitArray) obj;
179 if (ba.length != length) return false;
182 if (repn[i] != ba.repn[i]) return false;
/openjdk7/jdk/src/share/classes/java/lang/
H A DStringCoding.java75 private static byte[] safeTrim(byte[] ba, int len, Charset cs, boolean isTrusted) { argument
76 if (len == ba.length && (isTrusted || System.getSecurityManager() == null))
77 return ba;
79 return Arrays.copyOf(ba, len);
147 char[] decode(byte[] ba, int off, int len) { argument
153 int clen = ((ArrayDecoder)cd).decode(ba, off, len, ca);
157 ByteBuffer bb = ByteBuffer.wrap(ba, off, len);
176 static char[] decode(String charsetName, byte[] ba, int off, int len) argument
193 return sd.decode(ba, off, len);
196 static char[] decode(Charset cs, byte[] ba, in argument
250 decode(byte[] ba, int off, int len) argument
[all...]
/openjdk7/hotspot/src/share/vm/services/
H A DdiagnosticCommand.cpp208 typeArrayOop ba = typeArrayOop(res); local
210 output()->print_raw((const char*)addr, ba->length());
/openjdk7/jdk/src/solaris/native/sun/tools/attach/
H A DBsdVirtualMachine.c190 (JNIEnv *env, jclass cls, jint fd, jbyteArray ba, jint off, jint baLen)
208 (*env)->SetByteArrayRegion(env, ba, off, (jint)n, (jbyte *)(buf+off));
220 (JNIEnv *env, jclass cls, jint fd, jbyteArray ba, jint off, jint bufLen)
231 (*env)->GetByteArrayRegion(env, ba, off, len, (jbyte *)buf);
189 Java_sun_tools_attach_BsdVirtualMachine_read(JNIEnv *env, jclass cls, jint fd, jbyteArray ba, jint off, jint baLen) argument
219 Java_sun_tools_attach_BsdVirtualMachine_write(JNIEnv *env, jclass cls, jint fd, jbyteArray ba, jint off, jint bufLen) argument
/openjdk7/jdk/test/java/nio/Buffer/
H A DBasicByte.java856 public static void test(final byte [] ba) { argument
859 final ByteBuffer b = ByteBuffer.wrap(ba, offset, length);
861 ck(b, b.capacity(), ba.length);
866 tryCatch(ba, IndexOutOfBoundsException.class, new Runnable() {
868 ByteBuffer.wrap(ba, -1, ba.length);
870 tryCatch(ba, IndexOutOfBoundsException.class, new Runnable() {
872 ByteBuffer.wrap(ba, ba.length + 1, ba
[all...]
H A DBasicChar.java856 public static void test(final char [] ba) { argument
859 final CharBuffer b = CharBuffer.wrap(ba, offset, length);
861 ck(b, b.capacity(), ba.length);
866 tryCatch(ba, IndexOutOfBoundsException.class, new Runnable() {
868 CharBuffer.wrap(ba, -1, ba.length);
870 tryCatch(ba, IndexOutOfBoundsException.class, new Runnable() {
872 CharBuffer.wrap(ba, ba.length + 1, ba
[all...]
H A DBasicDouble.java856 public static void test(final double [] ba) { argument
859 final DoubleBuffer b = DoubleBuffer.wrap(ba, offset, length);
861 ck(b, b.capacity(), ba.length);
866 tryCatch(ba, IndexOutOfBoundsException.class, new Runnable() {
868 DoubleBuffer.wrap(ba, -1, ba.length);
870 tryCatch(ba, IndexOutOfBoundsException.class, new Runnable() {
872 DoubleBuffer.wrap(ba, ba.length + 1, ba
[all...]
H A DBasicFloat.java856 public static void test(final float [] ba) { argument
859 final FloatBuffer b = FloatBuffer.wrap(ba, offset, length);
861 ck(b, b.capacity(), ba.length);
866 tryCatch(ba, IndexOutOfBoundsException.class, new Runnable() {
868 FloatBuffer.wrap(ba, -1, ba.length);
870 tryCatch(ba, IndexOutOfBoundsException.class, new Runnable() {
872 FloatBuffer.wrap(ba, ba.length + 1, ba
[all...]
H A DBasicInt.java856 public static void test(final int [] ba) { argument
859 final IntBuffer b = IntBuffer.wrap(ba, offset, length);
861 ck(b, b.capacity(), ba.length);
866 tryCatch(ba, IndexOutOfBoundsException.class, new Runnable() {
868 IntBuffer.wrap(ba, -1, ba.length);
870 tryCatch(ba, IndexOutOfBoundsException.class, new Runnable() {
872 IntBuffer.wrap(ba, ba.length + 1, ba
[all...]
H A DBasicLong.java856 public static void test(final long [] ba) { argument
859 final LongBuffer b = LongBuffer.wrap(ba, offset, length);
861 ck(b, b.capacity(), ba.length);
866 tryCatch(ba, IndexOutOfBoundsException.class, new Runnable() {
868 LongBuffer.wrap(ba, -1, ba.length);
870 tryCatch(ba, IndexOutOfBoundsException.class, new Runnable() {
872 LongBuffer.wrap(ba, ba.length + 1, ba
[all...]

Completed in 110 milliseconds

12