Searched defs:buf (Results 1 - 25 of 151) sorted by relevance

1234567

/dalvik/libcore/nio/src/main/java/org/apache/harmony/nio/
H A DAddressUtil.java45 * void* GetDirectBufferAddress(JNIEnv* env, jobject buf);
48 * @param buf
54 public static int getDirectBufferAddress(Buffer buf) { argument
55 if (!(buf instanceof DirectBuffer)) {
58 return ((DirectBuffer) buf).getEffectiveAddress().toInt();
/dalvik/libcore/luni/src/main/java/java/net/
H A DURLEncoder.java53 StringBuilder buf = new StringBuilder(s.length() + 16);
58 buf.append(ch);
60 buf.append('+');
64 buf.append('%');
65 buf.append(digits.charAt((bytes[j] & 0xf0) >> 4));
66 buf.append(digits.charAt(bytes[j] & 0xf));
70 return buf.toString();
100 StringBuffer buf = new StringBuffer(s.length() + 16);
107 convert(s.substring(start, i), buf, enc);
111 buf
127 convert(String s, StringBuffer buf, String enc) argument
[all...]
/dalvik/libcore/archive/src/main/java/java/util/zip/
H A DAdler32.java59 * Update this {@code Adler32} checksum using the contents of {@code buf}.
61 * @param buf
64 public void update(byte[] buf) { argument
65 update(buf, 0, buf.length);
69 * Update this {@code Adler32} checksum with the contents of {@code buf},
72 * @param buf
75 * offset in {@code buf} to start reading from.
77 * number of bytes from {@code buf} to use.
79 * if {@code offset > buf
82 update(byte[] buf, int off, int nbytes) argument
92 updateImpl(byte[] buf, int off, int nbytes, long adler1) argument
[all...]
H A DCRC32.java58 * Updates this checksum with the bytes contained in buffer {@code buf}.
60 * @param buf
63 public void update(byte[] buf) { argument
64 update(buf, 0, buf.length);
69 * buf}, starting at offset {@code off}.
71 * @param buf
74 * the offset in {@code buf} to obtain data from.
76 * the number of bytes to read from {@code buf}.
78 public void update(byte[] buf, in argument
89 updateImpl(byte[] buf, int off, int nbytes, long crc1) argument
[all...]
H A DCheckedInputStream.java68 * into {@code buf}, starting at offset {@code off}. The checksum is
71 * @param buf
74 * the initial position in {@code buf} to store the bytes read
77 * the maximum number of bytes to store in {@code buf}.
84 public int read(byte[] buf, int off, int nbytes) throws IOException { argument
85 int x = in.read(buf, off, nbytes);
87 check.update(buf, off, x);
H A DCheckedOutputStream.java73 * Writes n bytes of data from {@code buf} starting at offset {@code off} to
76 * @param buf
79 * the offset to start reading the data from {@code buf} written
87 public void write(byte[] buf, int off, int nbytes) throws IOException { argument
88 out.write(buf, off, nbytes);
89 check.update(buf, off, nbytes);
H A DChecksum.java42 * @param buf
45 * the initial position in {@code buf} to read the bytes from.
47 * the number of bytes to read from {@code buf}.
49 public void update(byte[] buf, int off, int nbytes); argument
H A DDeflaterOutputStream.java39 protected byte[] buf; field in class:DeflaterOutputStream
126 buf = new byte[bsize];
139 x = def.deflate(buf);
140 out.write(buf, 0, x);
177 def.setInput(buf, 0, 0);
179 x = def.deflate(buf);
180 out.write(buf, 0, x);
193 * Compresses {@code nbytes} of data from {@code buf} starting at
210 // avoid int overflow, check null buf
234 int count = def.deflate(buf,
[all...]
/dalvik/libcore/archive/src/main/native/
H A Djava_util_zip_Adler32.c25 jbyteArray buf, int off, int len,
28 jbyte* b = (*env)->GetPrimitiveArrayCritical (env, buf, NULL);
33 (*env)->ReleasePrimitiveArrayCritical (env, buf, b, JNI_ABORT);
24 Java_java_util_zip_Adler32_updateImpl(JNIEnv * env, jobject recv, jbyteArray buf, int off, int len, jlong crc) argument
H A Djava_util_zip_CRC32.c25 jbyteArray buf, int off, int len,
28 jbyte* b = ((*env)->GetPrimitiveArrayCritical (env, buf, 0));
33 ((*env)->ReleasePrimitiveArrayCritical (env, buf, b, JNI_ABORT));
24 Java_java_util_zip_CRC32_updateImpl(JNIEnv * env, jobject recv, jbyteArray buf, int off, int len, jlong crc) argument
/dalvik/libcore/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/
H A DChunk.java56 public Chunk(int type, ByteBuffer buf) { argument
59 this.data = buf.array();
60 this.offset = buf.arrayOffset();
61 this.length = buf.position();
/dalvik/libcore/luni/src/main/java/java/io/
H A DBufferedOutputStream.java37 * BufferedOutputStream buf = new BufferedOutputStream(new FileOutputStream("file.java"));
46 protected byte[] buf; field in class:BufferedOutputStream
49 * The total number of bytes inside the byte array {@code buf}.
63 buf = new byte[8192];
97 buf = new byte[size];
109 if (buf == null) {
145 byte[] internalBuffer = buf;
182 if (buf == null) {
189 buf = null;
207 byte[] internalBuffer = buf;
[all...]
H A DReader.java135 * {@code buf} starting at offset 0. Returns the number of characters
138 * @param buf
145 public int read(char[] buf) throws IOException { argument
149 return read(buf, 0, buf.length);
154 * at {@code offset} in the character array {@code buf}. Returns the number
158 * @param buf
170 public abstract int read(char[] buf, int offset, int count) argument
270 char[] buf = new char[length];
271 length = Math.min(length, read(buf));
[all...]
H A DBufferedWriter.java41 * BufferedWriter buf = new BufferedWriter(new FileWriter("file.java"));
50 private char buf[]; field in class:BufferedWriter
68 buf = new char[8192];
103 this.buf = new char[size];
127 buf = null;
167 out.write(buf, 0, pos);
230 if (pos == 0 && count >= this.buf.length) {
234 int available = this.buf.length - pos;
239 System.arraycopy(cbuf, offset, this.buf, pos, available);
242 if (pos == this.buf
[all...]
/dalvik/libcore/luni/src/main/java/org/apache/harmony/luni/util/
H A DInputStreamHelper.java50 f[0] = ByteArrayInputStream.class.getDeclaredField("buf"); //$NON-NLS-1$
73 public ExposedByteArrayInputStream(byte buf[]) { argument
74 super(buf);
80 public ExposedByteArrayInputStream(byte buf[], int offset, int length) { argument
81 super(buf, offset, length);
88 if (pos == 0 && count == buf.length) {
90 return buf;
95 System.arraycopy(buf, pos, buffer, 0, available);
110 byte[] buffer, buf;
115 buf
[all...]
/dalvik/libcore/security/src/main/java/java/security/
H A DMessageDigestSpi.java108 * @param buf
111 * the index of the first byte in {@code buf} to store in.
114 * @return the number of bytes written to {@code buf}.
119 * {@code buf}.
122 protected int engineDigest(byte[] buf, int offset, int len) argument
132 if (offset + len > buf.length) {
140 System.arraycopy(tmp, 0, buf, offset, tmp.length);
/dalvik/libcore/security/src/main/java/org/bouncycastle/asn1/x509/
H A DX509NameTokenizer.java14 private StringBuffer buf = new StringBuffer(); field in class:X509NameTokenizer
47 buf.setLength(0);
61 buf.append(c);
71 if (c == '#' && buf.charAt(buf.length() - 1) == '=')
73 buf.append('\\');
77 buf.append('\\');
80 buf.append(c);
93 buf.append(c);
100 return buf
[all...]
/dalvik/libcore/security/src/main/java/org/bouncycastle/util/encoders/
H A DBufferedDecoder.java10 protected byte[] buf; field in class:BufferedDecoder
30 buf = new byte[bufSize];
41 buf[bufOff++] = in;
43 if (bufOff == buf.length)
45 resultLen = translator.decode(buf, 0, buf.length, out, outOff);
65 int gapLen = buf.length - bufOff;
69 System.arraycopy(in, inOff, buf, bufOff, gapLen);
71 resultLen += translator.decode(buf, 0, buf
[all...]
H A DBufferedEncoder.java10 protected byte[] buf; field in class:BufferedEncoder
30 buf = new byte[bufSize];
41 buf[bufOff++] = in;
43 if (bufOff == buf.length)
45 resultLen = translator.encode(buf, 0, buf.length, out, outOff);
65 int gapLen = buf.length - bufOff;
69 System.arraycopy(in, inOff, buf, bufOff, gapLen);
71 resultLen += translator.encode(buf, 0, buf
[all...]
/dalvik/libcore/support/src/test/java/tests/support/
H A DSupport_ASimpleInputStream.java16 public byte[] buf; field in class:Support_ASimpleInputStream
35 buf = input.getBytes();
37 len = buf.length;
43 buf = new byte[len];
44 System.arraycopy(input, 0, buf, 0, len);
68 int res = buf[pos];
H A DSupport_ASimpleOutputStream.java16 public byte[] buf; field in class:Support_ASimpleOutputStream
35 buf = new byte[bufferSize];
83 buf[pos] = (byte)(oneByte & 255);
92 System.arraycopy(buf, 0, toReturn, 0, pos);
97 return new String(buf, 0, pos);
H A DSupport_ASimpleReader.java16 public char[] buf; field in class:Support_ASimpleReader
35 buf = input.toCharArray();
37 len = buf.length;
63 System.arraycopy(buf, pos, dest, offset, readable);
H A DSupport_StringWriter.java24 private StringBuffer buf; field in class:Support_StringWriter
33 buf = new StringBuffer(16);
34 lock = buf;
44 buf = new StringBuffer(initialSize);
45 lock = buf;
80 return buf;
94 return buf.toString();
100 * in <code>buf</code> to this StringWriter.
102 * @param buf
105 * offset in buf t
113 write(char[] buf, int offset, int count) argument
[all...]
H A DThrowingReader.java45 @Override public int read(char[] buf, int offset, int count) argument
53 int returned = super.read(buf, offset, count);
/dalvik/libcore/xml/src/main/java/org/apache/xml/utils/
H A DXMLCharacterRecognizer.java69 * @param buf StringBuffer to check as XML whitespace.
72 public static boolean isWhiteSpace(StringBuffer buf) argument
75 int n = buf.length();
79 if (!isWhiteSpace(buf.charAt(i)))

Completed in 622 milliseconds

1234567