Searched refs:offset (Results 1 - 25 of 238) 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/libcore/util/
H A DCharsetUtils.java29 public static native byte[] toAsciiBytes(String s, int offset, int length); argument
35 public static native byte[] toIsoLatin1Bytes(String s, int offset, int length); argument
41 public static native byte[] toUtf8Bytes(String s, int offset, int length); argument
47 public static byte[] toBigEndianUtf16Bytes(String s, 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/ojluni/src/main/java/javax/crypto/spec/
H A DDESedeKeySpec.java67 * <code>key</code>, beginning at <code>offset</code> inclusive,
71 * <code>key[offset]</code> and <code>key[offset+23]</code> inclusive.
74 * 24 bytes of the buffer beginning at <code>offset</code> inclusive
76 * @param offset the offset in <code>key</code>, where the DES-EDE key
81 * <code>offset</code> inclusive, is shorter than 24 bytes
83 public DESedeKeySpec(byte[] key, int offset) throws InvalidKeyException { argument
84 if (key.length - offset < 24) {
88 System.arraycopy(key, offset, thi
114 isParityAdjusted(byte[] key, int offset) argument
[all...]
H A DGCMParameterSpec.java99 * @param offset the offset in {@code src} where the IV starts
103 * {@code src} is null, {@code len} or {@code offset} is negative,
104 * or the sum of {@code offset} and {@code len} is greater than the
107 public GCMParameterSpec(int tLen, byte[] src, int offset, int len) { argument
108 init(tLen, src, offset, len);
114 private void init(int tLen, byte[] src, int offset, int len) { argument
122 if ((src == null) ||(len < 0) || (offset < 0)
123 || ((len + offset) > src.length)) {
128 System.arraycopy(src, offset, i
[all...]
H A DIvParameterSpec.java58 * bytes in <code>iv</code>, beginning at <code>offset</code>
62 * <code>iv[offset]</code> and <code>iv[offset+len-1]</code> inclusive.
65 * bytes of the buffer beginning at <code>offset</code> inclusive
67 * @param offset the offset in <code>iv</code> where the IV
71 * or <code>(iv.length - offset < len)</code>
72 * @throws ArrayIndexOutOfBoundsException is thrown if <code>offset</code>
75 public IvParameterSpec(byte[] iv, int offset, int len) { argument
79 if (iv.length - offset < le
[all...]
/libcore/luni/src/main/java/java/nio/charset/
H A DModifiedUtf8.java63 * Encode {@code s} into {@code dst} starting at offset {@code offset}.
67 public static void encode(byte[] dst, int offset, String s) { argument
73 dst[offset++] = (byte) 0xc0;
74 dst[offset++] = (byte) 0x80;
76 dst[offset++] = (byte) c;
79 dst[offset++] = (byte) ((c >>> 6) | 0xc0);
80 dst[offset++] = (byte) ((c & 0x3f) | 0x80);
82 dst[offset++] = (byte) ((c >>> 12) | 0xe0);
83 dst[offset
118 decode(byte[] in, char[] out, int offset, int length) argument
[all...]
/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...]
/libcore/ojluni/src/main/java/sun/nio/ch/
H A DNativeObject.java64 * whose base is at the additional offset.
66 NativeObject(long address, long offset) { argument
68 this.address = address + offset;
99 * Creates a new native object starting at the given offset from the base
102 * @param offset
103 * The offset from the base of this native object that is to be
108 NativeObject subObject(int offset) { argument
109 return new NativeObject(offset + address);
113 * Reads an address from this native object at the given offset and
116 * @param offset
123 getObject(int offset) argument
150 putObject(int offset, NativeObject ob) argument
175 getByte(int offset) argument
189 putByte(int offset, byte value) argument
202 getShort(int offset) argument
216 putShort(int offset, short value) argument
229 getChar(int offset) argument
243 putChar(int offset, char value) argument
256 getInt(int offset) argument
270 putInt(int offset, int value) argument
283 getLong(int offset) argument
297 putLong(int offset, long value) argument
310 getFloat(int offset) argument
324 putFloat(int offset, float value) argument
337 getDouble(int offset) argument
351 putDouble(int offset, double value) argument
[all...]
H A DAbstractPollArrayWrapper.java65 int offset = SIZE_POLLFD * i + EVENT_OFFSET;
66 return pollArray.getShort(offset);
70 int offset = SIZE_POLLFD * i + REVENT_OFFSET;
71 return pollArray.getShort(offset);
75 int offset = SIZE_POLLFD * i + FD_OFFSET;
76 return pollArray.getInt(offset);
80 int offset = SIZE_POLLFD * i + EVENT_OFFSET;
81 pollArray.putShort(offset, (short)event);
85 int offset = SIZE_POLLFD * i + REVENT_OFFSET;
86 pollArray.putShort(offset, (shor
[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/ojluni/src/main/java/java/nio/
H A DMappedByteBuffer.java87 MappedByteBuffer(int mark, int pos, int lim, int cap, byte[] buf, int offset) { argument
88 super(mark, pos, lim, cap, buf, offset);
107 long offset = address % ps;
108 return (offset >= 0) ? offset : (ps + offset);
141 long offset = mappingOffset();
142 long length = mappingLength(offset);
143 return isLoaded0(mappingAddress(offset), length, Bits.pageCount(length));
163 long offset
[all...]
H A DStringCharBuffer.java49 offset + this.position());
57 int offset) {
58 super(mark, pos, limit, cap, null, offset);
64 position(), limit(), capacity(), offset);
72 return str.charAt(nextGetIndex() + offset);
76 return str.charAt(checkIndex(index) + offset);
80 return str.charAt(index + offset);
102 return str.toString().substring(start + offset, end + offset);
113 offset);
52 StringCharBuffer(CharSequence s, int mark, int pos, int limit, int cap, int offset) argument
[all...]
H A DByteBufferAsDoubleBuffer.java34 protected final int offset; field in class:ByteBufferAsDoubleBuffer
55 offset = off;
63 int off = (pos << 3) + offset;
74 offset,
84 offset,
89 return (i << 3) + offset;
100 public DoubleBuffer get(double[] dst, int offset, int length) { argument
101 checkBounds(offset, length, dst.length);
104 bb.getUnchecked(ix(position), dst, offset, length);
122 public DoubleBuffer put(double[] src, int offset, in argument
[all...]
H A DByteBufferAsFloatBuffer.java33 protected final int offset; field in class:ByteBufferAsFloatBuffer
54 offset = off;
62 int off = (pos << 2) + offset;
73 offset,
83 offset,
88 return (i << 2) + offset;
99 public FloatBuffer get(float[] dst, int offset, int length) { argument
100 checkBounds(offset, length, dst.length);
103 bb.getUnchecked(ix(position), dst, offset, length);
121 public FloatBuffer put(float[] src, int offset, in 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/ojluni/src/main/java/sun/misc/
H A DUnsafe.java70 * Gets the raw byte offset from the start of an object's memory to
75 * @return the offset to the field
85 * Gets the offset from the start of an array object's memory to
89 * @return the offset to the initial element
121 * @param offset offset to the field within <code>obj</code>
128 public native boolean compareAndSwapInt(Object obj, long offset, argument
136 * @param offset offset to the field within <code>obj</code>
143 public native boolean compareAndSwapLong(Object obj, long offset, argument
158 compareAndSwapObject(Object obj, long offset, Object expectedValue, Object newValue) argument
169 getIntVolatile(Object obj, long offset) argument
179 putIntVolatile(Object obj, long offset, int newValue) argument
189 getLongVolatile(Object obj, long offset) argument
199 putLongVolatile(Object obj, long offset, long newValue) argument
209 getObjectVolatile(Object obj, long offset) argument
219 putObjectVolatile(Object obj, long offset, Object newValue) argument
229 getInt(Object obj, long offset) argument
238 putInt(Object obj, long offset, int newValue) argument
243 putOrderedInt(Object obj, long offset, int newValue) argument
252 getLong(Object obj, long offset) argument
261 putLong(Object obj, long offset, long newValue) argument
266 putOrderedLong(Object obj, long offset, long newValue) argument
275 getObject(Object obj, long offset) argument
284 putObject(Object obj, long offset, Object newValue) argument
289 putOrderedObject(Object obj, long offset, Object newValue) argument
293 getBoolean(Object obj, long offset) argument
294 putBoolean(Object obj, long offset, boolean newValue) argument
295 getByte(Object obj, long offset) argument
296 putByte(Object obj, long offset, byte newValue) argument
297 getChar(Object obj, long offset) argument
298 putChar(Object obj, long offset, char newValue) argument
299 getShort(Object obj, long offset) argument
300 putShort(Object obj, long offset, short newValue) argument
301 getFloat(Object obj, long offset) argument
302 putFloat(Object obj, long offset, float newValue) argument
303 getDouble(Object obj, long offset) argument
304 putDouble(Object obj, long offset, double newValue) argument
413 getAndAddInt(Object o, long offset, int delta) argument
433 getAndAddLong(Object o, long offset, long delta) argument
453 getAndSetInt(Object o, long offset, int newValue) argument
473 getAndSetLong(Object o, long offset, long newValue) argument
493 getAndSetObject(Object o, long offset, Object newValue) argument
[all...]
H A DBASE64Encoder.java82 protected void encodeAtom(OutputStream outStream, byte data[], int offset, int len) argument
87 a = data[offset];
95 a = data[offset];
96 b = data[offset+1];
103 a = data[offset];
104 b = data[offset+1];
105 c = data[offset+2];
/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/ojluni/src/main/java/java/net/
H A DDatagramPacket.java58 int offset; field in class:DatagramPacket
66 * length <code>length</code>, specifying an offset into the buffer.
72 * @param offset the offset for the buffer
77 public DatagramPacket(byte buf[], int offset, int length) { argument
78 setData(buf, offset, length);
99 * <code>length</code> with offset <code>ioffset</code>to the
105 * @param offset the packet data offset.
113 public DatagramPacket(byte buf[], int offset, in argument
136 DatagramPacket(byte buf[], int offset, int length, SocketAddress address) argument
258 setData(byte[] buf, int offset, int length) argument
[all...]
/libcore/ojluni/src/main/java/java/text/
H A DIcuIteratorWrapper.java267 * (i.e., the CharacterIterator's starting offset).
269 * @return The offset of the beginning of the text.
277 * (i.e., the CharacterIterator's ending offset).
279 * @return The text's past-the-end offset.
292 * @return The character offset of the boundary position n boundaries away from
318 * Throw IllegalArgumentException unless begin <= offset < end.
320 protected static final void checkOffset(int offset, CharacterIterator text) { argument
321 if (offset < text.getBeginIndex() || offset > text.getEndIndex()) {
322 throw new IllegalArgumentException("offset ou
333 following(int offset) argument
346 preceding(int offset) argument
363 isBoundary(int offset) argument
[all...]
/libcore/ojluni/src/main/java/java/lang/
H A DStringIndexOutOfBoundsException.java93 public StringIndexOutOfBoundsException(String s, int offset, int count) { argument
94 this(s.length(), offset, count);
101 public StringIndexOutOfBoundsException(int sourceLength, int offset, argument
103 super("length=" + sourceLength + "; regionStart=" + offset
H A DArrayIndexOutOfBoundsException.java81 public ArrayIndexOutOfBoundsException(int sourceLength, int offset, argument
83 super("length=" + sourceLength + "; regionStart=" + offset
/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/ojluni/src/main/java/java/util/zip/
H A DGZIPOutputStream.java139 * @param off the start offset of the data
199 * offset.
201 private void writeTrailer(byte[] buf, int offset) throws IOException { argument
202 writeInt((int)crc.getValue(), buf, offset); // CRC-32 of uncompr. data
203 writeInt(def.getTotalIn(), buf, offset + 4); // Number of uncompr. bytes
208 * given offset.
210 private void writeInt(int i, byte[] buf, int offset) throws IOException { argument
211 writeShort(i & 0xffff, buf, offset);
212 writeShort((i >> 16) & 0xffff, buf, offset + 2);
217 * at a given offset
219 writeShort(int s, byte[] buf, int offset) argument
[all...]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
H A DWriterTest.java104 private int offset; field in class:WriterTest.MockWriter
109 offset = 0;
121 public void write(char[] buffer, int offset, int count) argument
126 if (offset < 0 || count < 0 || offset >= buffer.length) {
129 count = Math.min(count, buffer.length - offset);
130 count = Math.min(count, this.length - this.offset);
132 contents[this.offset + i] = buffer[offset + i];
134 this.offset
[all...]

Completed in 571 milliseconds

12345678910