Searched refs:offset (Results 1 - 25 of 237) sorted by relevance

12345678910

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/org/xml/sax/support/
H A DBrokenInputStream.java31 private int offset; field in class:BrokenInputStream
33 public BrokenInputStream(InputStream stream, int offset) { argument
37 this.offset = offset;
42 if (offset == 0) {
46 offset--;
/libcore/luni/src/main/java/java/nio/charset/
H A DCharsets.java29 public static native byte[] toAsciiBytes(char[] chars, int offset, int length); argument
35 public static native byte[] toIsoLatin1Bytes(char[] chars, int offset, int length); argument
41 public static native byte[] toUtf8Bytes(char[] chars, int offset, int length); argument
47 public static byte[] toBigEndianUtf16Bytes(char[] chars, int offset, int length) { argument
49 int end = offset + length;
51 for (int i = offset; i < end; ++i) {
67 public static native void asciiBytesToChars(byte[] bytes, int offset, int length, char[] chars); argument
76 public static native void isoLatin1BytesToChars(byte[] bytes, int offset, int length, char[] chars); argument
/libcore/luni/src/main/java/libcore/io/
H A DMemory.java45 public static int peekInt(byte[] src, int offset, ByteOrder order) { argument
47 return (((src[offset++] & 0xff) << 24) |
48 ((src[offset++] & 0xff) << 16) |
49 ((src[offset++] & 0xff) << 8) |
50 ((src[offset ] & 0xff) << 0));
52 return (((src[offset++] & 0xff) << 0) |
53 ((src[offset++] & 0xff) << 8) |
54 ((src[offset++] & 0xff) << 16) |
55 ((src[offset ] & 0xff) << 24));
59 public static long peekLong(byte[] src, int offset, ByteOrde argument
83 peekShort(byte[] src, int offset, ByteOrder order) argument
91 pokeInt(byte[] dst, int offset, int value, ByteOrder order) argument
105 pokeLong(byte[] dst, int offset, long value, ByteOrder order) argument
131 pokeShort(byte[] dst, int offset, short value, ByteOrder order) argument
216 pokeByteArray(long address, byte[] src, int offset, int count) argument
217 pokeCharArray(long address, char[] src, int offset, int count, boolean swap) argument
218 pokeDoubleArray(long address, double[] src, int offset, int count, boolean swap) argument
219 pokeFloatArray(long address, float[] src, int offset, int count, boolean swap) argument
220 pokeIntArray(long address, int[] src, int offset, int count, boolean swap) argument
221 pokeLongArray(long address, long[] src, int offset, int count, boolean swap) argument
222 pokeShortArray(long address, short[] src, int offset, int count, boolean swap) argument
[all...]
H A DHeapBufferIterator.java29 private final int offset; field in class:HeapBufferIterator
35 HeapBufferIterator(byte[] buffer, int offset, int byteCount, ByteOrder order) { argument
37 this.offset = offset;
42 public void seek(int offset) { argument
43 position = offset;
51 System.arraycopy(buffer, offset + position, dst, dstOffset, byteCount);
56 byte result = buffer[offset + position];
62 int result = Memory.peekInt(buffer, offset + position, order);
69 Memory.unsafeBulkGet(dst, dstOffset, byteCount, buffer, offset
83 iterator(byte[] buffer, int offset, int byteCount, ByteOrder order) argument
[all...]
/libcore/luni/src/main/java/java/text/
H A DStringCharacterIterator.java27 int start, end, offset; field in class:StringCharacterIterator
39 start = offset = 0;
64 offset = location;
92 offset = location;
118 if (offset == end) {
121 return string.charAt(offset);
143 && offset == it.offset;
157 offset = start;
158 return string.charAt(offset);
[all...]
H A DRuleBasedBreakIterator.java42 @Override public int following(int offset) { argument
43 checkOffset(offset);
44 return wrapped.following(offset);
47 private void checkOffset(int offset) { argument
52 if (offset < it.getBeginIndex() || offset > it.getEndIndex()) {
86 @Override public boolean isBoundary(int offset) { argument
87 checkOffset(offset);
88 return wrapped.isBoundary(offset);
91 @Override public int preceding(int offset) { argument
[all...]
/libcore/luni/src/main/java/org/apache/harmony/security/asn1/
H A DBerOutputStream.java36 /** current offset */
37 protected int offset; field in class:BerOutputStream
46 encoded[offset++] = (byte) tag; //FIXME long form?
55 encoded[offset] = (byte) (numOctets | 0x80);
56 offset++;
59 int numOffset = offset + numOctets - 1;
63 offset += numOctets;
65 encoded[offset++] = (byte) length;
70 System.arraycopy(content, 0, encoded, offset, length);
71 offset
[all...]
/libcore/luni/src/main/java/java/nio/
H A DMemoryBlock.java100 public static MemoryBlock mmap(FileDescriptor fd, long offset, long size, MapMode mapMode) throws IOException { argument
106 if (offset < 0 || size < 0 || offset > Integer.MAX_VALUE || size > Integer.MAX_VALUE) {
107 throw new IllegalArgumentException("offset=" + offset + " size=" + size);
122 long address = Libcore.os.mmap(0L, size, prot, flags, fd, offset);
169 public final void pokeByte(int offset, byte value) { argument
170 Memory.pokeByte(address + offset, value);
173 public final void pokeByteArray(int offset, byte[] src, int srcOffset, int byteCount) { argument
174 Memory.pokeByteArray(address + offset, sr
177 pokeCharArray(int offset, char[] src, int srcOffset, int charCount, boolean swap) argument
181 pokeDoubleArray(int offset, double[] src, int srcOffset, int doubleCount, boolean swap) argument
185 pokeFloatArray(int offset, float[] src, int srcOffset, int floatCount, boolean swap) argument
189 pokeIntArray(int offset, int[] src, int srcOffset, int intCount, boolean swap) argument
193 pokeLongArray(int offset, long[] src, int srcOffset, int longCount, boolean swap) argument
197 pokeShortArray(int offset, short[] src, int srcOffset, int shortCount, boolean swap) argument
201 peekByte(int offset) argument
205 peekByteArray(int offset, byte[] dst, int dstOffset, int byteCount) argument
209 peekCharArray(int offset, char[] dst, int dstOffset, int charCount, boolean swap) argument
213 peekDoubleArray(int offset, double[] dst, int dstOffset, int doubleCount, boolean swap) argument
217 peekFloatArray(int offset, float[] dst, int dstOffset, int floatCount, boolean swap) argument
221 peekIntArray(int offset, int[] dst, int dstOffset, int intCount, boolean swap) argument
225 peekLongArray(int offset, long[] dst, int dstOffset, int longCount, boolean swap) argument
229 peekShortArray(int offset, short[] dst, int dstOffset, int shortCount, boolean swap) argument
233 pokeShort(int offset, short value, ByteOrder order) argument
237 peekShort(int offset, ByteOrder order) argument
241 pokeInt(int offset, int value, ByteOrder order) argument
245 peekInt(int offset, ByteOrder order) argument
249 pokeLong(int offset, long value, ByteOrder order) argument
253 peekLong(int offset, ByteOrder order) argument
[all...]
/libcore/luni/src/main/java/org/w3c/dom/
H A DCharacterData.java68 * @param offset Start offset of substring to extract.
70 * @return The specified substring. If the sum of <code>offset</code> and
74 * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
81 public String substringData(int offset, argument
97 * Insert a string at the specified 16-bit unit offset.
98 * @param offset The character offset at which to insert.
101 * INDEX_SIZE_ERR: Raised if the specified <code>offset</code> is
106 public void insertData(int offset, argument
125 deleteData(int offset, int count) argument
148 replaceData(int offset, int count, String arg) argument
[all...]
/libcore/dalvik/src/main/java/org/apache/harmony/dalvik/ddmc/
H A DChunk.java25 * The "offset" and "length" fields are present so handlers can over-allocate
35 public int offset, length; // position within "data" field in class:Chunk
45 public Chunk(int type, byte[] data, int offset, int length) { argument
48 this.offset = offset;
54 * offset 0 and continue to the current position.
60 this.offset = buf.arrayOffset();
/libcore/luni/src/main/java/org/apache/harmony/xml/dom/
H A DCharacterDataImpl.java46 public void deleteData(int offset, int count) throws DOMException { argument
47 buffer.delete(offset, offset + count);
70 public void insertData(int offset, String arg) throws DOMException { argument
72 buffer.insert(offset, arg);
78 public void replaceData(int offset, int count, String arg) argument
81 buffer.replace(offset, offset + count, arg);
91 public String substringData(int offset, int count) throws DOMException { argument
93 return buffer.substring(offset, offse
[all...]
/libcore/luni/src/main/java/java/lang/
H A DStringBuilder.java260 * @param offset
261 * the inclusive offset index.
266 * if {@code offset} and {@code len} do not specify a valid
270 public StringBuilder append(char[] str, int offset, int len) { argument
271 append0(str, offset, len);
365 * at the specified {@code offset}. The {@code boolean} value is converted
369 * @param offset
375 * if {@code offset} is negative or greater than the current
379 public StringBuilder insert(int offset, boolean b) { argument
380 insert0(offset,
399 insert(int offset, char c) argument
419 insert(int offset, int i) argument
439 insert(int offset, long l) argument
459 insert(int offset, float f) argument
480 insert(int offset, double d) argument
500 insert(int offset, Object obj) argument
518 insert(int offset, String str) argument
538 insert(int offset, char[] ch) argument
564 insert(int offset, char[] str, int strOffset, int strLen) argument
586 insert(int offset, CharSequence s) argument
614 insert(int offset, CharSequence s, int start, int end) argument
[all...]
H A DStringIndexOutOfBoundsException.java78 public StringIndexOutOfBoundsException(String s, int offset, int count) { argument
79 this(s.length(), offset, count);
86 public StringIndexOutOfBoundsException(int sourceLength, int offset, argument
88 super("length=" + sourceLength + "; regionStart=" + offset
H A DArrayIndexOutOfBoundsException.java70 public ArrayIndexOutOfBoundsException(int sourceLength, int offset, argument
72 super("length=" + sourceLength + "; regionStart=" + offset
/libcore/libart/src/main/java/sun/misc/
H A DUnsafe.java58 * Gets the raw byte offset from the start of an object's memory to
63 * @return the offset to the field
73 * Gets the offset from the start of an array object's memory to
77 * @return the offset to the initial element
109 * @param offset offset to the field within <code>obj</code>
116 public native boolean compareAndSwapInt(Object obj, long offset, argument
124 * @param offset offset to the field within <code>obj</code>
131 public native boolean compareAndSwapLong(Object obj, long offset, argument
146 compareAndSwapObject(Object obj, long offset, Object expectedValue, Object newValue) argument
157 getIntVolatile(Object obj, long offset) argument
167 putIntVolatile(Object obj, long offset, int newValue) argument
177 getLongVolatile(Object obj, long offset) argument
187 putLongVolatile(Object obj, long offset, long newValue) argument
197 getObjectVolatile(Object obj, long offset) argument
207 putObjectVolatile(Object obj, long offset, Object newValue) argument
217 getInt(Object obj, long offset) argument
226 putInt(Object obj, long offset, int newValue) argument
231 putOrderedInt(Object obj, long offset, int newValue) argument
240 getLong(Object obj, long offset) argument
249 putLong(Object obj, long offset, long newValue) argument
254 putOrderedLong(Object obj, long offset, long newValue) argument
263 getObject(Object obj, long offset) argument
272 putObject(Object obj, long offset, Object newValue) argument
277 putOrderedObject(Object obj, long offset, Object newValue) argument
[all...]
/libcore/luni/src/main/java/java/net/
H A DDatagramPacket.java48 private int offset = 0; field in class:DatagramPacket
65 * {@code length} bytes with a specified buffer offset.
69 * @param offset
70 * the offset of the byte array where the bytes is written.
74 public DatagramPacket(byte[] data, int offset, int length) { argument
75 setData(data, offset, length);
82 * length} bytes from the byte array position {@code offset} are sent.
86 * @param offset
87 * the offset of {@code data} where to read from.
95 public DatagramPacket(byte[] data, int offset, in argument
180 setData(byte[] data, int offset, int byteCount) argument
286 DatagramPacket(byte[] data, int offset, int length, SocketAddress sockAddr) argument
[all...]
/libcore/luni/src/main/java/java/io/
H A DOutputStream.java87 * position {@code offset} to this stream.
91 * @param offset
99 * if {@code offset < 0} or {@code count < 0}, or if
100 * {@code offset + count} is bigger than the length of
103 public void write(byte[] buffer, int offset, int count) throws IOException { argument
104 Arrays.checkOffsetAndCount(buffer.length, offset, count);
105 for (int i = offset; i < offset + count; i++) {
H A DBufferedWriter.java165 * Writes {@code count} characters starting at {@code offset} in
172 * @param offset
177 * if {@code offset < 0} or {@code count < 0}, or if
178 * {@code offset + count} is greater than the size of
184 public void write(char[] buffer, int offset, int count) throws IOException { argument
190 Arrays.checkOffsetAndCount(buffer.length, offset, count);
192 out.write(buffer, offset, count);
200 System.arraycopy(buffer, offset, this.buf, pos, available);
207 offset += available;
210 out.write(buffer, offset, availabl
264 write(String str, int offset, int count) argument
[all...]
H A DCharArrayReader.java64 * read the buffer is set to {@code offset}.
68 * @param offset
73 * if {@code offset < 0} or {@code length < 0}, or if
74 * {@code offset} is greater than the size of {@code buf} .
76 public CharArrayReader(char[] buf, int offset, int length) { argument
79 * of offset and length, it doesn't consider buffer's length. And to be
81 * (offset + length) overflows.
83 if (offset < 0 || offset > buf.length || length < 0 || offset
198 read(char[] buffer, int offset, int count) argument
[all...]
H A DWriter.java98 * Writes {@code count} characters starting at {@code offset} in {@code buf}
103 * @param offset
108 * if {@code offset < 0} or {@code count < 0}, or if {@code
109 * offset + count} is greater than the size of {@code buf}.
113 public abstract void write(char[] buf, int offset, int count) throws IOException; argument
146 * offset} to the target.
150 * @param offset
157 * if {@code offset < 0} or {@code count < 0}, or if {@code
158 * offset + count} is greater than the length of {@code str}.
160 public void write(String str, int offset, in argument
[all...]
/libcore/luni/src/main/java/java/util/zip/
H A DAdler32.java70 * starting from {@code offset} and reading {@code byteCount} bytes of data.
72 public void update(byte[] buf, int offset, int byteCount) { argument
73 Arrays.checkOffsetAndCount(buf.length, offset, byteCount);
74 adler = updateImpl(buf, offset, byteCount, adler);
77 private native long updateImpl(byte[] buf, int offset, int byteCount, long adler1); argument
H A DCRC32.java71 * starting from {@code offset} and reading {@code byteCount} bytes of data.
73 public void update(byte[] buf, int offset, int byteCount) { argument
74 Arrays.checkOffsetAndCount(buf.length, offset, byteCount);
76 crc = updateImpl(buf, offset, byteCount, crc);
79 private native long updateImpl(byte[] buf, int offset, int byteCount, long crc1); argument
/libcore/support/src/test/java/tests/support/
H A DSupport_StringWriter.java99 * Writes <code>count</code> characters starting at <code>offset</code>
104 * @param offset
105 * offset in buf to retrieve characters
110 * If offset or count are outside of bounds.
113 public void write(char[] buf, int offset, int count) { argument
115 if (0 <= offset && offset <= buf.length && 0 <= count
116 && count <= buf.length - offset) {
118 this.buf.append(buf, offset, count);
158 * <code>offset</cod
172 write(String str, int offset, int count) argument
[all...]
/libcore/luni/src/main/java/java/util/concurrent/atomic/
H A DAtomicIntegerArray.java85 private int getRaw(long offset) { argument
86 return unsafe.getIntVolatile(array, offset);
119 long offset = checkedByteOffset(i);
121 int current = getRaw(offset);
122 if (compareAndSetRaw(offset, current, newValue))
141 private boolean compareAndSetRaw(long offset, int expect, int update) { argument
142 return unsafe.compareAndSwapInt(array, offset, expect, update);
190 long offset = checkedByteOffset(i);
192 int current = getRaw(offset);
193 if (compareAndSetRaw(offset, curren
[all...]
H A DAtomicLongArray.java84 private long getRaw(long offset) { argument
85 return unsafe.getLongVolatile(array, offset);
118 long offset = checkedByteOffset(i);
120 long current = getRaw(offset);
121 if (compareAndSetRaw(offset, current, newValue))
140 private boolean compareAndSetRaw(long offset, long expect, long update) { argument
141 return unsafe.compareAndSwapLong(array, offset, expect, update);
189 long offset = checkedByteOffset(i);
191 long current = getRaw(offset);
192 if (compareAndSetRaw(offset, curren
[all...]

Completed in 1011 milliseconds

12345678910