Home
last modified time | relevance | path

Searched refs:source (Results 1 – 25 of 142) sorted by relevance

123456

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/
DSourceChannelTest.java40 private Pipe.SourceChannel source; field in SourceChannelTest
50 source = pipe.source(); in setUp()
60 assertEquals(SelectionKey.OP_READ, source.validOps()); in test_validOps()
69 int count = source.read(ByteBuffer.allocate(10)); in test_read_LByteBuffer_DataAvailable()
79 source.read(nullBuf); in test_read_LByteBuffer_Exception()
93 long count = source.read(readBuf); in test_read_LByteBuffer_SinkClosed()
96 count = source.read(readBuf); in test_read_LByteBuffer_SinkClosed()
100 count = source.read(readBuf); in test_read_LByteBuffer_SinkClosed()
109 source.close(); in test_read_LByteBuffer_SourceClosed()
111 source.read(readBuf); in test_read_LByteBuffer_SourceClosed()
[all …]
/libcore/ojluni/src/main/java/java/text/
DRuleBasedCollator.java329 public CollationElementIterator getCollationElementIterator(String source) { in getCollationElementIterator() argument
331 if (source == null) { in getCollationElementIterator()
334 return new CollationElementIterator(collAsICU().getCollationElementIterator(source)); in getCollationElementIterator()
346 CharacterIterator source) { in getCollationElementIterator() argument
348 if (source == null) { in getCollationElementIterator()
351 return new CollationElementIterator(collAsICU().getCollationElementIterator(source)); in getCollationElementIterator()
362 public synchronized int compare(String source, String target) in compare() argument
364 if (source == null || target == null) { in compare()
368 return icuColl.compare(source, target); in compare()
376 public synchronized CollationKey getCollationKey(String source) in getCollationKey() argument
[all …]
DCollationKey.java119 return source; in getSourceString()
141 protected CollationKey(String source) { in CollationKey() argument
142 if (source==null){ in CollationKey()
145 this.source = source; in CollationKey()
148 final private String source; field in CollationKey
DCollationElementIterator.java272 public void setText(String source) in setText() argument
275 icuIterator.setText(source); in setText()
284 public void setText(CharacterIterator source) in setText() argument
287 icuIterator.setText(source); in setText()
/libcore/luni/src/main/java/java/math/
DBitLevel.java114 static void shiftLeftOneBit(int[] result, int[] source, int srcLen) { in shiftLeftOneBit() argument
117 int val = source[i]; in shiftLeftOneBit()
126 static BigInteger shiftLeftOneBit(BigInteger source) { in shiftLeftOneBit() argument
127 source.prepareJavaRepresentation(); in shiftLeftOneBit()
128 int srcLen = source.numberLength; in shiftLeftOneBit()
131 shiftLeftOneBit(resDigits, source.digits, srcLen); in shiftLeftOneBit()
132 return new BigInteger(source.sign, resLen, resDigits); in shiftLeftOneBit()
136 static BigInteger shiftRight(BigInteger source, int count) { in shiftRight() argument
137 source.prepareJavaRepresentation(); in shiftRight()
140 if (intCount >= source.numberLength) { in shiftRight()
[all …]
/libcore/ojluni/src/test/java/util/stream/boottest/java/util/stream/
DSliceSpliteratorTest.java44 Collection<T> source; field in SliceSpliteratorTest.UnorderedContentAsserter
46 UnorderedContentAsserter(Collection<T> source) { in UnorderedContentAsserter() argument
47 this.source = source; in UnorderedContentAsserter()
57 assertTrue(source.containsAll(actual)); in assertContents()
74 … final Collection<Integer> source = IntStream.range(0, size).boxed().collect(toList()); in sliceSpliteratorDataProvider()
77 … Spliterator<Integer> s = Arrays.spliterator(source.stream().toArray(Integer[]::new)); in sliceSpliteratorDataProvider()
87 … final Collection<Integer> source = IntStream.range(0, size).boxed().collect(toList()); in sliceSpliteratorDataProvider()
90 … Spliterator.OfInt s = Arrays.spliterator(source.stream().mapToInt(i->i).toArray()); in sliceSpliteratorDataProvider()
100 … final Collection<Long> source = LongStream.range(0, size).boxed().collect(toList()); in sliceSpliteratorDataProvider()
103 … Spliterator.OfLong s = Arrays.spliterator(source.stream().mapToLong(i->i).toArray()); in sliceSpliteratorDataProvider()
[all …]
/libcore/ojluni/src/main/java/java/util/
DEventObject.java46 protected transient Object source; field in EventObject
54 public EventObject(Object source) { in EventObject() argument
55 if (source == null) in EventObject()
58 this.source = source; in EventObject()
67 return source; in getSource()
76 return getClass().getName() + "[source=" + source + "]"; in toString()
DScanner.java332 private Readable source; field in Scanner
539 private Scanner(Readable source, Pattern pattern) { in Scanner() argument
540 assert source != null : "source should not be null"; in Scanner()
542 this.source = source; in Scanner()
559 public Scanner(Readable source) { in Scanner() argument
560 this(Objects.requireNonNull(source, "source"), WHITESPACE_PATTERN); in Scanner()
571 public Scanner(InputStream source) { in Scanner() argument
572 this(new InputStreamReader(source), WHITESPACE_PATTERN); in Scanner()
586 public Scanner(InputStream source, String charsetName) { in Scanner() argument
587 this(makeReadable(Objects.requireNonNull(source, "source"), toCharset(charsetName)), in Scanner()
[all …]
/libcore/ojluni/src/main/java/sun/nio/fs/
DUnixCopyFile.java127 private static void copyDirectory(UnixPath source, in copyDirectory() argument
179 sfd = open(source, O_RDONLY, 0); in copyDirectory()
182 x.rethrowAsIOException(source); in copyDirectory()
185 source.getFileSystem().copyNonPosixAttributes(sfd, dfd); in copyDirectory()
219 private static void copyFile(UnixPath source, in copyFile() argument
228 fi = open(source, O_RDONLY, 0); in copyFile()
230 x.rethrowAsIOException(source); in copyFile()
253 x.rethrowAsIOException(source, target); in copyFile()
267 source.getFileSystem().copyNonPosixAttributes(fi, fo); in copyFile()
303 private static void copyLink(UnixPath source, in copyLink() argument
[all …]
/libcore/ojluni/src/main/java/sun/nio/ch/
DMembershipKeyImpl.java44 private final InetAddress source; field in MembershipKeyImpl
58 InetAddress source) in MembershipKeyImpl() argument
63 this.source = source; in MembershipKeyImpl()
77 InetAddress source, in Type4() argument
82 super(ch, group, interf, source); in Type4()
96 int source() { in source() method in MembershipKeyImpl.Type4
112 InetAddress source, in Type6() argument
117 super(ch, group, interf, source); in Type6()
131 byte[] source() { in source() method in MembershipKeyImpl.Type6
167 return source; in sourceAddress()
[all …]
DPipeImpl.java38 private final SourceChannel source; field in PipeImpl
47 source = new SourceChannelImpl(sp, sourcefd); in PipeImpl()
53 public SourceChannel source() { in source() method in PipeImpl
54 return source; in source()
DNet.java523 static int join4(FileDescriptor fd, int group, int interf, int source)
526 return joinOrDrop4(true, fd, group, interf, source);
532 static void drop4(FileDescriptor fd, int group, int interf, int source)
535 joinOrDrop4(false, fd, group, interf, source);
538 …e static native int joinOrDrop4(boolean join, FileDescriptor fd, int group, int interf, int source)
544 static int block4(FileDescriptor fd, int group, int interf, int source)
547 return blockOrUnblock4(true, fd, group, interf, source);
553 static void unblock4(FileDescriptor fd, int group, int interf, int source)
556 blockOrUnblock4(false, fd, group, interf, source);
560 int interf, int source)
[all …]
/libcore/ojluni/src/test/java/util/stream/test/org/openjdk/tests/java/util/stream/
DMatchOpTest.java98 …private <T> void assertPredicates(List<T> source, Kind kind, Predicate<T>[] predicates, boolean...… in assertPredicates() argument
101 boolean match = this.<T>kinds().get(kind).apply(predicates[i]).apply(source.stream()); in assertPredicates()
135 final Supplier<Iterator<Integer>> source; in testInfinite() field in MatchOpTest.CycleIterator
138 CycleIterator(Supplier<Iterator<Integer>> source) { in testInfinite() argument
139 this.source = source; in testInfinite()
145 i = source.get(); in testInfinite()
153 i = source.get(); in testInfinite()
159 Supplier<Iterator<Integer>> source = () -> Arrays.asList(1, 2, 3, 4).iterator(); in testInfinite() local
160 … -> StreamSupport.stream(Spliterators.spliteratorUnknownSize(new CycleIterator(source), 0), false); in testInfinite()
183 …private void assertIntPredicates(Supplier<IntStream> source, Kind kind, IntPredicate[] predicates,… in assertIntPredicates() argument
[all …]
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/text/
DRuleBasedCollatorTest.java35 String source = null; in test_getCollationKeyLjava_lang_String() local
38 CollationKey ck = rbc.getCollationKey(source); in test_getCollationKeyLjava_lang_String()
84 String source = "abc"; in testGetCollationKey() local
85 CollationKey key1 = coll.getCollationKey(source); in testGetCollationKey()
86 assertEquals(source, key1.getSourceString()); in testGetCollationKey()
91 assertTrue(coll.compare(source, source2) > 0); in testGetCollationKey()
104 String source = "cha"; in testGetCollationElementIteratorString() local
105 CollationElementIterator iterator = coll.getCollationElementIterator(source); in testGetCollationElementIteratorString()
110 while (offset != source.length()) { in testGetCollationElementIteratorString()
121 String source = "\u00fcb"; in testGetCollationElementIteratorString() local
[all …]
/libcore/luni/src/test/java/libcore/java/util/
DEventObjectTest.java35 Object source = new Object(); in testGetSource() local
36 assertSame(source, new EventObject(source).getSource()); in testGetSource()
46 Object source = new Object(); in testSerializationNullsOutSource() local
47 EventObject eventObject = new EventObject(source); in testSerializationNullsOutSource()
/libcore/ojluni/src/main/java/java/util/logging/
DSimpleFormatter.java142 String source; in format() local
144 source = record.getSourceClassName(); in format()
146 source += " " + record.getSourceMethodName(); in format()
149 source = record.getLoggerName(); in format()
163 source, in format()
/libcore/luni/src/main/java/javax/xml/transform/sax/
DSAXSource.java186 public static InputSource sourceToInputSource(Source source) { in sourceToInputSource() argument
188 if (source instanceof SAXSource) { in sourceToInputSource()
189 return ((SAXSource) source).getInputSource(); in sourceToInputSource()
190 } else if (source instanceof StreamSource) { in sourceToInputSource()
191 StreamSource ss = (StreamSource) source; in sourceToInputSource()
/libcore/tools/testmapping/
Dsave_logs.py72 def relative_source_name(source): argument
74 return os.path.relpath(source, LOGS_ROOT)
121 def do_copy(source): argument
123 destination = destination_path(flatten_name(relative_source_name(source)))
128 (util.printable_path(source), util.printable_path(destination)))
129 shutil.copyfile(source, destination)
/libcore/luni/src/test/java/libcore/java/io/
DFileDescriptorTest.java57 for (FileDescriptor source : sources) { in testFileDescriptorCloneForFork()
61 target.setInt$(source.getInt$()); in testFileDescriptorCloneForFork()
62 assertEquals(target.getInt$(), source.getInt$()); in testFileDescriptorCloneForFork()
66 assertTrue(source.valid()); in testFileDescriptorCloneForFork()
68 assertNotEquals(target.getInt$(), source.getInt$()); in testFileDescriptorCloneForFork()
DOldInputStreamReaderTest.java33 …private final String source = "This is a test message with Unicode character. \u4e2d\u56fd is Chin… field in OldInputStreamReaderTest
48 in = new ByteArrayInputStream(source.getBytes("UTF-8")); in setUp()
118 char[] chars = new char[source.length()]; in testReadcharArrayintint()
123 assertEquals(source.length() - 8, reader.read(chars, 8, in testReadcharArrayintint()
125 assertTrue(Arrays.equals(chars, source.toCharArray())); in testReadcharArrayintint()
127 assertTrue(Arrays.equals(chars, source.toCharArray())); in testReadcharArrayintint()
131 char[] chars = new char[source.length()]; in testReadcharArrayintint2()
132 assertEquals(source.length() - 3, reader.read(chars, 0, in testReadcharArrayintint2()
139 reader.read(new char[source.length()]); in testReady()
/libcore/ojluni/src/main/java/java/nio/file/
DCopyMoveHelper.java100 static void copyToForeignTarget(Path source, Path target, in copyToForeignTarget() argument
109 BasicFileAttributes attrs = Files.readAttributes(source, in copyToForeignTarget()
125 try (InputStream in = Files.newInputStream(source)) { in copyToForeignTarget()
154 static void moveToForeignTarget(Path source, Path target, in moveToForeignTarget() argument
157 copyToForeignTarget(source, target, convertMoveToCopyOptions(options)); in moveToForeignTarget()
158 Files.delete(source); in moveToForeignTarget()
/libcore/luni/src/test/java/libcore/java/lang/
DSystemTest.java137 final Object[] source = new Object[512 * 1024]; in testArrayCopyConcurrentModification() local
145 source[source.length - 1] = this; in testArrayCopyConcurrentModification()
146 source[source.length - 1] = null; in testArrayCopyConcurrentModification()
153 System.arraycopy(source, 0, target, 0, source.length); in testArrayCopyConcurrentModification()
154 assertNull(target[source.length - 1]); // make sure the wrong type didn't sneak in in testArrayCopyConcurrentModification()
/libcore/luni/src/test/java/libcore/java/nio/
DOldDirectShortBufferTest.java33 short[] source = { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; in testPutWhenOffsetIsNonZero() local
35 shortBuffer.put(source, 2, 2); in testPutWhenOffsetIsNonZero()
36 shortBuffer.put(source, 4, 2); in testPutWhenOffsetIsNonZero()
DOldDirectIntBufferTest.java33 int[] source = { 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }; in testPutWhenOffsetIsNonZero() local
35 intBuffer.put(source, 2, 2); in testPutWhenOffsetIsNonZero()
36 intBuffer.put(source, 4, 2); in testPutWhenOffsetIsNonZero()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/
DInputStreamReaderTest.java99 …private final String source = "This is a test message with Unicode character. \u4e2d\u56fd is Chin… field in InputStreamReaderTest
108 in = new ByteArrayInputStream(source.getBytes("UTF-8")); in setUp()
331 reader.read(new char[source.length() - 5], 0, source.length() - 5); in test_read()
416 assertEquals(source, sb.deleteCharAt(0).toString()); in test_read_specialCharset()
427 assertEquals(source, sb.toString()); in test_read_specialCharset()
455 bis = new ByteArrayInputStream(source.getBytes("UTF-8")); in test_read$CII()
457 char[] chars = new char[source.length()]; in test_read$CII()
458 assertEquals(source.length() - 3, isr.read(chars, 0, chars.length - 3)); in test_read$CII()
505 char[] chars = new char[source.length()]; in test_read$CII_1()
510 assertEquals(source.length() - 8, reader.read(chars, 8, in test_read$CII_1()
[all …]

123456