Home
last modified time | relevance | path

Searched refs:contents (Results 1 – 25 of 39) sorted by relevance

12

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DWriterTest.java100 private char[] contents; field in WriterTest.MockWriter
107 contents = new char[capacity]; in MockWriter()
114 contents = null; in close()
123 if (null == contents) { in write()
132 contents[this.offset + i] = buffer[offset + i]; in write()
141 result[i] = contents[i]; in getContents()
DReaderTest.java162 private char[] contents; field in ReaderTest.MockReader
173 contents = data; in MockReader()
174 length = contents.length; in MockReader()
180 contents = null; in close()
186 if (null == contents) { in read()
198 buf[offset + i] = contents[current_offset + i]; in read()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DPropertyResourceBundleTest.java187 Vector<String> contents = new Vector<String>(); in test_access$0_Enumeration() local
189 contents.add(keys.nextElement()); in test_access$0_Enumeration()
192 assertEquals("did not get the right number of properties", 4, contents in test_access$0_Enumeration()
194 assertTrue("did not get the parent property p1", contents in test_access$0_Enumeration()
196 assertTrue("did not get the parent property p2", contents in test_access$0_Enumeration()
198 assertTrue("did not get the local property p3", contents.contains("p3")); in test_access$0_Enumeration()
199 assertTrue("did not get the local property p4", contents.contains("p4")); in test_access$0_Enumeration()
/libcore/support/src/test/java/tests/support/
DSupport_TestResource_fr.java24 Object[][] contents = { { "parent2", "frValue2" }, in getContents() local
27 return contents; in getContents()
DSupport_TestResource_en_US.java24 Object[][] contents = { { "parent3", "enUSValue3" }, in getContents() local
27 return contents; in getContents()
DSupport_TestResource_fr_FR_VAR.java24 Object[][] contents = { { "parent4", "frFRVARValue4" }, in getContents() local
28 return contents; in getContents()
DSupport_TestResource_fr_FR.java24 Object[][] contents = { { "parent3", "frFRValue3" }, in getContents() local
27 return contents; in getContents()
DSupport_TestResource_en.java24 Object[][] contents = { { "parent2", "enValue2" }, in getContents() local
27 return contents; in getContents()
DSupport_TestResource.java25 Object[][] contents = { { "parent1", "parentValue1" }, in getContents() local
28 return contents; in getContents()
/libcore/luni/src/test/etc/loading-test-jar/
DTestMethods.java129 byte[] contents = readFully(in); in test_getResourceAsStream()
130 String s = new String(contents, "UTF-8"); in test_getResourceAsStream()
185 byte[] contents = readFully(in); in test_diff_getResourceAsStream()
186 String s = new String(contents, "UTF-8"); in test_diff_getResourceAsStream()
/libcore/luni/src/main/java/java/util/
DListResourceBundle.java118 Object[][] contents = getContents();
119 table = new HashMap<String, Object>(contents.length / 3 * 4 + 3);
120 for (Object[] content : contents) {
DVector.java993 public synchronized <T> T[] toArray(T[] contents) { in toArray() argument
994 if (elementCount > contents.length) { in toArray()
995 Class<?> ct = contents.getClass().getComponentType(); in toArray()
996 contents = (T[]) Array.newInstance(ct, elementCount); in toArray()
998 System.arraycopy(elementData, 0, contents, 0, elementCount); in toArray()
999 if (elementCount < contents.length) { in toArray()
1000 contents[elementCount] = null; in toArray()
1002 return contents; in toArray()
DLinkedList.java924 Object[] contents = new Object[size]; in toArray() local
927 contents[index++] = link.data; in toArray()
930 return contents; in toArray()
950 public <T> T[] toArray(T[] contents) { in toArray() argument
952 if (size > contents.length) { in toArray()
953 Class<?> ct = contents.getClass().getComponentType(); in toArray()
954 contents = (T[]) Array.newInstance(ct, size); in toArray()
958 contents[index++] = (T) link.data; in toArray()
961 if (index < contents.length) { in toArray()
962 contents[index] = null; in toArray()
[all …]
DArrayList.java516 @Override public <T> T[] toArray(T[] contents) { in toArray() argument
518 if (contents.length < s) { in toArray()
520 = (T[]) Array.newInstance(contents.getClass().getComponentType(), s); in toArray()
521 contents = newArray; in toArray()
523 System.arraycopy(this.array, 0, contents, 0, s); in toArray()
524 if (contents.length > s) { in toArray()
525 contents[s] = null; in toArray()
527 return contents; in toArray()
DAbstractCollection.java342 public <T> T[] toArray(T[] contents) { in toArray() argument
343 return toArrayList().toArray(contents); in toArray()
/libcore/luni/src/test/java/libcore/java/util/zip/
DOldAndroidGZIPStreamTest.java97 ByteArrayOutputStream contents = new ByteArrayOutputStream(); in scanGZIP() local
102 contents.write(buf, 0, len); in scanGZIP()
DOldAndroidZipStreamTest.java145 ByteArrayOutputStream contents = new ByteArrayOutputStream(); in scanZip() local
150 contents.write(buf, 0, len); in scanZip()
/libcore/luni/src/main/java/java/nio/
DLongBuffer.java436 long[] contents = new long[src.remaining()]; in put() local
437 src.get(contents); in put()
438 put(contents); in put()
DShortBuffer.java435 short[] contents = new short[src.remaining()]; in put() local
436 src.get(contents); in put()
437 put(contents); in put()
DIntBuffer.java435 int[] contents = new int[src.remaining()]; in put() local
436 src.get(contents); in put()
437 put(contents); in put()
DFloatBuffer.java446 float[] contents = new float[src.remaining()]; in put() local
447 src.get(contents); in put()
448 put(contents); in put()
DCharBuffer.java501 char[] contents = new char[src.remaining()]; in put() local
502 src.get(contents); in put()
503 put(contents); in put()
/libcore/luni/src/test/java/libcore/xml/
DDeclarationTest.java60 private String stringToSystemId(String contents) throws IOException { in stringToSystemId() argument
64 out.write(contents.getBytes("UTF-8")); in stringToSystemId()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/zip/
DDeflaterInputStreamTest.java146 byte[] contents = Streams.readFully(dis); in testRead_golden()
147 assertTrue(Arrays.equals(TEST_STRING_DEFLATED_BYTES, contents)); in testRead_golden()
164 byte[] contents = Streams.readFully(dis); in testRead_leavesBufUnmodified()
165 assertTrue(Arrays.equals(TEST_STRING_DEFLATED_BYTES, contents)); in testRead_leavesBufUnmodified()
/libcore/json/src/test/java/org/json/
DJSONObjectTest.java652 Map<String, Object> contents = new HashMap<String, Object>(); in testCreateWithUnsupportedNumbers() local
653 contents.put("foo", Double.NaN); in testCreateWithUnsupportedNumbers()
654 contents.put("bar", Double.NEGATIVE_INFINITY); in testCreateWithUnsupportedNumbers()
655 contents.put("baz", Double.POSITIVE_INFINITY); in testCreateWithUnsupportedNumbers()
657 JSONObject object = new JSONObject(contents); in testCreateWithUnsupportedNumbers()
670 Map<String, Object> contents = new HashMap<String, Object>(); in testMapConstructorCopiesContents() local
671 contents.put("foo", 5); in testMapConstructorCopiesContents()
672 JSONObject object = new JSONObject(contents); in testMapConstructorCopiesContents()
673 contents.put("foo", 10); in testMapConstructorCopiesContents()
678 Map<Object, Object> contents = new HashMap<Object, Object>(); in testMapConstructorWithBogusEntries() local
[all …]

12