/libcore/luni/src/test/java/libcore/java/io/ |
OldInputStreamReaderTest.java | 6 * (the "License"); you may not use this file except in compliance with 11 * Unless required by applicable law or agreed to in writing, software 33 private final String source = "This is a test message with Unicode character. \u4e2d\u56fd is China's name in Chinese"; 35 private InputStream in; field in class:OldInputStreamReaderTest 48 in = new ByteArrayInputStream(source.getBytes("UTF-8")); 49 reader = new InputStreamReader(in, "UTF-8"); 63 in.close();
|
/frameworks/base/core/java/android/provider/ |
DocumentsContract.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 85 * is used in the {@code <intent-filter>} of a {@code <provider>}. 96 * Set this in a DocumentsUI intent to cause a package's own roots to be 102 * Included in {@link AssetFileDescriptor#getExtras()} when returned 111 * Overrides the default prompt text in DocumentsUI when set in an intent. 195 * Timestamp when a document was last modified, in milliseconds since 230 * Size of a document, in bytes, or {@code null} if unknown. This column 291 * Flag indicating that a directory prefers its contents be shown in 941 final Bundle in = new Bundle(); local 980 final Bundle in = new Bundle(); local 1012 final Bundle in = new Bundle(); local [all...] |
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/charset/ |
CharsetEncoderTest.java | 5 * (the "License"); you may not use this file except in compliance with 10 * Unless required by applicable law or agreed to in writing, software 282 CharBuffer in = CharBuffer.wrap("aaa"); local 295 encoder.encode(in, out, true); 304 encoder.encode(in, out, false); 327 // encode facade can be execute in anywhere 328 CharBuffer in = CharBuffer.wrap("aaa"); local 330 encoder.encode(in); 331 in.rewind(); 334 encoder.encode(in); 372 CharBuffer in = CharBuffer.wrap("aaa"); local 422 CharBuffer in = CharBuffer.wrap("aaa"); local 591 CharBuffer in = CharBuffer.wrap("\\ud800"); local 628 CharBuffer in; local 708 CharBuffer in = CharBuffer.wrap(unistr); local 833 CharBuffer in = getMalformedCharBuffer(); local 917 CharBuffer in = CharBuffer.wrap("aaa"); local [all...] |
/libcore/luni/src/test/java/libcore/java/net/ |
SocketTest.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 110 SocketChannel in = ssc.accept(); local 112 in.socket().setTcpNoDelay(false); 115 InetSocketAddress listenAddress = (InetSocketAddress) in.socket().getLocalSocketAddress(); 118 InetSocketAddress inLocalAddress = (InetSocketAddress) in.socket().getLocalSocketAddress(); 119 InetSocketAddress inRemoteAddress = (InetSocketAddress) in.socket().getRemoteSocketAddress(); 137 assertTrue(in.isConnected()); 138 assertTrue(in.socket().isConnected()); 142 in.close() 247 InputStream in = socket.getInputStream(); local 310 InputStream in = socket.getInputStream(); local 409 InputStream in = socket.getInputStream(); local [all...] |
/libcore/luni/src/test/java/libcore/xml/ |
XsltXPathConformanceTestSuite.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 80 * <p>Unfortunately, some of the tests in the OASIS suite will fail when 84 * "Couldn't open file" errors due to a mismatch in file name casing. 86 * stylesheet files. In particular, "http://webxtest/" isn't generally 271 * Finds the named file in the named directory. This tries extra hard to 273 * available in a different casing. 428 * Returns the given file's XML fragment as a single node, wrapped in 451 // it in <result> tags would result in a malformed XML document 581 InputStream in = new BufferedInputStream(new FileInputStream(file), 1024); local [all...] |
/cts/hostsidetests/appsecurity/test-apps/SplitApp/src/com/android/cts/splitapp/ |
SplitAppTest.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 94 fail("Unexpected drawable in base"); 117 // Receiver disabled by default in base 124 // We shouldn't have any native code in base 127 fail("Unexpected native code in base"); 262 // Receiver only enabled in feature 280 // And assert that we spun up the provider in this process 334 * Write app data in a number of locations that expect to remain intact over 513 private static String getXmlTestValue(XmlPullParser in) throws XmlPullParserException 529 BufferedReader in = null; local [all...] |
/cts/hostsidetests/theme/src/android/theme/cts/ |
ThemeHostTest.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 56 /** The class name of the main activity in the APK. */ 115 final ZipInputStream in = new ZipInputStream(zipStream); local 119 while ((ze = in.getNextEntry()) != null) { 125 while ((count = in.read(buffer)) != -1) { 136 in.close(); 226 assertTrue(failures + " failures in theme test", failures == 0); 251 final Scanner in = new Scanner(logs); local 252 while (in.hasNextLine()) [all...] |
/cts/libs/json/src/com/android/json/stream/ |
JsonReader.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 29 * end delimiters of objects and arrays. The tokens are traversed in 30 * depth-first order, the same order that they appear in the JSON document. 37 * <p>Next, create handler methods for each structure in your JSON text. You'll 86 * public List<Message> readJsonStream(InputStream in) throws IOException { 87 * JsonReader reader = new JsonReader(new InputStreamReader(in, "UTF-8")); 165 * in JSON. 176 private final Reader in; field in class:JsonReader 207 * and length in the buffer [all...] |
/cts/tests/tests/os/src/android/os/cts/ |
ParcelFileDescriptorTest.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 53 AutoCloseInputStream in = new AutoCloseInputStream(pfd); local 56 assertEquals(0, in.read()); 57 assertEquals(1, in.read()); 58 assertEquals(2, in.read()); 59 assertEquals(3, in.read()); 61 in.close(); 105 AutoCloseInputStream in = new AutoCloseInputStream(pfd); local 106 assertEquals(DATA, in.read()) 181 AutoCloseInputStream in = new AutoCloseInputStream(pfd); local [all...] |
/external/antlr/antlr-3.4/runtime/Java/src/main/java/org/antlr/runtime/debug/ |
DebugEventSocketProxy.java | 6 Redistribution and use in source and binary forms, with or without 11 2. Redistributions in binary form must reproduce the above copyright 12 notice, this list of conditions and the following disclaimer in the 20 IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 43 * be kept in sync. New events must be handled on both sides of socket. 52 protected BufferedReader in; field in class:DebugEventSocketProxy 83 in = new BufferedReader(isr); 108 in.readLine() [all...] |
/external/apache-harmony/security/src/test/api/java/org/apache/harmony/security/tests/java/security/ |
KeyStore2Test.java | 6 * (the "License"); you may not use this file except in compliance with 11 * Unless required by applicable law or agreed to in writing, software 472 InputStream in = new ByteArrayInputStream(keyStore); local 473 keyTest.load(in, pssWord); 474 in.close(); 484 in = new ByteArrayInputStream(keyStore); 485 keyTest.load(in, null); 486 in.close();
|
/external/eclipse-basebuilder/basebuilder-3.6.2/org.eclipse.releng.basebuilder/plugins/org.eclipse.test.performance.ui/src/org/eclipse/test/internal/performance/results/utils/ |
Util.java | 166 InputStream in = new FileInputStream(src); local 170 while ((len = in.read(buf)) > 0) { 173 in.close(); 188 * @param in the input stream. 193 public static boolean copyStream(InputStream in, File dest) { 199 while ((len = in.read(buf)) > 0) { 202 in.close();
|
/external/guava/guava/src/com/google/common/io/ |
ByteStreams.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 66 * scheduled for removal in Guava 18.0. 79 * @param off the offset in the buffer of the first byte to read 83 * method is scheduled for removal in Guava 18.0. 96 * scheduled to be removed in Guava 16.0. 110 * scheduled for removal in Guava 18.0. 127 * is scheduled for removal in Guava 18.0. 145 * method is scheduled for removal in Guava 18.0. 164 * method is scheduled for removal in Guava 18.0 860 InputStream in = closer.register(supplier.getInput()); local [all...] |
/external/guava/guava-tests/test/com/google/common/io/ |
ByteSourceTest.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 71 InputStream in = source.openBufferedStream(); local 76 ByteStreams.copy(in, out); 77 in.close(); 336 for (ByteSource in : BROKEN_SOURCES) { 337 runFailureTest(in, newNormalByteSink()); 340 runFailureTest(in, BROKEN_CLOSE_SINK); 341 assertEquals((in == BROKEN_OPEN_SOURCE) ? 0 : 1, getAndResetRecords(logHandler)); 352 for (ByteSource in : BROKEN_SOURCES) [all...] |
/external/jetty/src/java/org/eclipse/jetty/server/session/ |
HashSessionManager.java | 49 * An in-memory implementation of SessionManager. 148 * @return the period in seconds at which a check is made for sessions to be invalidated. 183 * Configures the period in seconds after which a session is deemed idle and saved 246 * @return the period in seconds at which sessions are periodically saved to disk 258 * @param seconds the period in seconds at which a check is made for sessions to be invalidated. 295 * Find sessions that have timed out and invalidate them. This runs in the 443 // CanonicalFile is used to capture the base store directory in a way that will 506 FileInputStream in = null; local 512 in = new FileInputStream(file); 513 HashedSession session = restoreSession(in, null) 571 DataInputStream in = new DataInputStream(is); local [all...] |
/external/jmonkeyengine/engine/src/core-plugins/com/jme3/material/plugins/ |
J3MLoader.java | 5 * Redistribution and use in source and binary forms, with or without 12 * * Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 28 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 432 throw new IOException("In multiroot material, expected first statement to be 'Exception'"); 435 throw new IOException("Too many roots in J3M/J3MD file"); 479 throw new IOException("Cannot use colon in material name/path"); 508 InputStream in = info.openStream() local [all...] |
/external/jmonkeyengine/engine/src/desktop/com/jme3/app/state/ |
MjpegFileWriter.java | 341 // in 421 AVIIndex in = (AVIIndex) ind.get(i); local 422 baos.write(in.toBytes());
|
/external/jmonkeyengine/engine/src/ogre/com/jme3/scene/plugins/ogre/ |
SkeletonLoader.java | 5 * Redistribution and use in source and binary forms, with or without 12 * * Redistributions in binary form must reproduce the above copyright 13 * notice, this list of conditions and the following disclaimer in the 23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 28 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 226 * Reset the SkeletonLoader in case an error occured while parsing XML. 253 public Object load(InputStream in) throws IOException { 267 InputStreamReader r = new InputStreamReader(in); 292 InputStream in = null local [all...] |
/external/okhttp/okhttp-tests/src/test/java/com/squareup/okhttp/internal/http/ |
HttpOverSpdyTest.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 258 InputStream in = connection.getInputStream(); local 259 assertEquals("ABC", readAscii(in, 3)); 260 assertEquals(-1, in.read()); 261 assertEquals(-1, in.read()); 296 * arrive in time. 427 private String readAscii(InputStream in, int count) throws IOException { 430 int value = in.read(); 432 in.close() [all...] |
/external/okhttp/okio/okio/src/test/java/okio/ |
BufferedSourceTest.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 459 sink.writeUtf8("d"); // b...bcd, d is in the 2nd segment. 504 InputStream in = source.inputStream(); local 506 int read = in.read(bytes); 511 read = in.read(bytes); 515 read = in.read(bytes); 523 assertEquals(-1, in.read()); 528 InputStream in = source.inputStream(); local 530 int read = in.read(bytes, 1, 3) 542 InputStream in = source.inputStream(); local 549 InputStream in = source.inputStream(); local 558 InputStream in = source.inputStream(); local [all...] |
/frameworks/base/core/java/android/ddm/ |
DdmHandleViewDebug.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 50 /** Operation on view root, first parameter in packet should be one of VURT_* constants */ 63 * Generic View Operation, first parameter in the packet should be one of the 83 /** Error code indicating operation specified in chunk is invalid. */ 124 ByteBuffer in = wrapChunk(request); local 125 int op = in.getInt(); 127 View rootView = getRootView(in); 134 return dumpHierarchy(rootView, in); 143 final View targetView = getTargetView(rootView, in); 169 ByteBuffer in = wrapChunk(request); local [all...] |
/frameworks/base/core/java/android/os/ |
FileUtils.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 174 InputStream in = new FileInputStream(srcFile); local 176 result = copyToFile(in, destFile); 178 in.close(); 272 } else { // "cat" mode: size unknown, read it all in streaming fashion 333 * Delete older files in a directory until only those matching the given
|
/frameworks/base/core/java/android/util/ |
JsonReader.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 31 * end delimiters of objects and arrays. The tokens are traversed in 32 * depth-first order, the same order that they appear in the JSON document. 39 * <p>Next, create handler methods for each structure in your JSON text. You'll 88 * public List<Message> readJsonStream(InputStream in) throws IOException { 89 * JsonReader reader = new JsonReader(new InputStreamReader(in, "UTF-8")); 171 * in JSON. 184 private final Reader in; field in class:JsonReader 200 * The offset of the first character in the buffer [all...] |
/frameworks/base/core/java/android/view/ |
Display.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 36 * The display area is described in two different ways. 51 * such as the built-in screen or an external monitor. The contents of a logical 86 * The default Display id, which is the id of the built-in primary display 98 * that is stored in protected graphics buffers. 109 * in protected graphics buffers may not be composited. 136 * by applications from appearing in screenshots or from being viewed 206 * Display type: Built-in display. 257 * Display state: The display is dozing in a low power state; it is stil [all...] |
/frameworks/base/core/tests/coretests/src/android/net/ |
NetworkStatsHistoryTest.java | 5 * you may not use this file except in compliance with the License. 10 * Unless required by applicable law or agreed to in writing, software 66 final DataInputStream in = new DataInputStream( local 71 final NetworkStatsHistory history = new NetworkStatsHistory(in); 87 in.close(); 154 // now record something in middle, spread across two buckets 160 // now should have four buckets, with new record in middle two buckets 172 // record some data in one bucket, and another overlapping buckets 293 // verify total in first hour 391 final ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray()) local 498 final ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray()); local [all...] |