- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 29 for Writer (0.43 sec)
-
android/guava-tests/test/com/google/common/io/TestCharSink.java
return byteSink.wasStreamClosed(); } @Override public Writer openStream() throws IOException { // using TestByteSink's output stream to get option behavior, so flush to it on every write return new FilterWriter(new OutputStreamWriter(byteSink.openStream(), UTF_8)) { @Override public void write(int c) throws IOException { super.write(c); flush(); } @Override
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Fri Apr 21 02:27:51 GMT 2017 - 2K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/AppendableWriterTest.java
StringBuilder builder = new StringBuilder(); Writer writer = new AppendableWriter(builder); writer.write("Hello".toCharArray()); writer.write(','); writer.write(0xBEEF0020); // only lower 16 bits are important writer.write("Wo"); writer.write("Whirled".toCharArray(), 3, 2); writer.write("Mad! Mad, I say", 2, 2); assertEquals("Hello, World!", builder.toString()); }
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 3.2K bytes - Viewed (0) -
android/guava/src/com/google/common/io/AppendableWriter.java
class AppendableWriter extends Writer { private final Appendable target; private boolean closed; /** * Creates a new writer that appends everything it writes to {@code target}. * * @param target target to which to append output */ AppendableWriter(Appendable target) { this.target = checkNotNull(target); } /* * Abstract methods from Writer */ @Override
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Feb 28 20:13:02 GMT 2023 - 3.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CharSinkTester.java
Writer writer = sink.openStream(); try { writer.write(data); } finally { writer.close(); } assertContainsExpectedString(); } public void testOpenBufferedStream() throws IOException { Writer writer = sink.openBufferedStream(); try { writer.write(data); } finally { writer.close(); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Oct 10 19:45:10 GMT 2022 - 4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CharSourceTester.java
Reader reader = source.openStream(); StringWriter writer = new StringWriter(); char[] buf = new char[64]; int read; while ((read = reader.read(buf)) != -1) { writer.write(buf, 0, read); } reader.close(); writer.close(); assertExpectedString(writer.toString()); } public void testOpenBufferedStream() throws IOException {
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Mon Oct 10 19:45:10 GMT 2022 - 6.8K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/ResourcesTest.java
// loader, even if it is not visible to the loader of the Resources class. File tempFile = createTempFile(); PrintWriter writer = new PrintWriter(tempFile, "UTF-8"); writer.println("rud a chur ar an méar fhada"); writer.close(); // First check that we can't find it without setting the context loader. // This is a sanity check that the test doesn't spuriously pass because
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 6.8K bytes - Viewed (0) -
android/guava/src/com/google/common/io/ByteSink.java
} /** * Writes all the given bytes to this sink. * * @throws IOException if an I/O occurs while writing to this sink */ public void write(byte[] bytes) throws IOException { checkNotNull(bytes); Closer closer = Closer.create(); try { OutputStream out = closer.register(openStream()); out.write(bytes);
Java - Registered: Fri Apr 26 12:43:10 GMT 2024 - Last Modified: Tue Feb 28 20:13:02 GMT 2023 - 5.5K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/CharSourceTester.java
Reader reader = source.openStream(); StringWriter writer = new StringWriter(); char[] buf = new char[64]; int read; while ((read = reader.read(buf)) != -1) { writer.write(buf, 0, read); } reader.close(); writer.close(); assertExpectedString(writer.toString()); } public void testOpenBufferedStream() throws IOException {
Java - Registered: Fri Apr 19 12:43:09 GMT 2024 - Last Modified: Mon Oct 10 19:45:10 GMT 2022 - 7.3K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/io/CharSinkTest.java
public void setUp() { sink = new TestCharSink(); } public void testOpenBufferedStream() throws IOException { Writer writer = sink.openBufferedStream(); assertTrue(sink.wasStreamOpened()); assertFalse(sink.wasStreamClosed()); writer.write(STRING); writer.close(); assertTrue(sink.wasStreamClosed()); assertEquals(STRING, sink.getString()); }
Java - Registered: Fri May 03 12:43:13 GMT 2024 - Last Modified: Wed Sep 06 17:04:31 GMT 2023 - 4K bytes - Viewed (0) -
guava-tests/test/com/google/common/io/TestCharSink.java
return byteSink.wasStreamClosed(); } @Override public Writer openStream() throws IOException { // using TestByteSink's output stream to get option behavior, so flush to it on every write return new FilterWriter(new OutputStreamWriter(byteSink.openStream(), UTF_8)) { @Override public void write(int c) throws IOException { super.write(c); flush(); } @Override
Java - Registered: Fri Apr 12 12:43:09 GMT 2024 - Last Modified: Fri Nov 09 21:39:24 GMT 2012 - 2K bytes - Viewed (0)