Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for AsCharSink (0.06 sec)

  1. android/guava/src/com/google/common/io/ByteSink.java

      /**
       * Returns a {@link CharSink} view of this {@code ByteSink} that writes characters to this sink as
       * bytes encoded with the given {@link Charset charset}.
       */
      public CharSink asCharSink(Charset charset) {
        return new AsCharSink(charset);
      }
    
      /**
       * Opens a new {@link OutputStream} for writing to this sink. This method returns a new,
       * independent stream each time it is called.
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 21 03:10:51 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  2. guava/src/com/google/common/io/ByteSink.java

      /**
       * Returns a {@link CharSink} view of this {@code ByteSink} that writes characters to this sink as
       * bytes encoded with the given {@link Charset charset}.
       */
      public CharSink asCharSink(Charset charset) {
        return new AsCharSink(charset);
      }
    
      /**
       * Opens a new {@link OutputStream} for writing to this sink. This method returns a new,
       * independent stream each time it is called.
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 21 03:10:51 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/SourceSinkFactories.java

            try {
              writer.write(initialString);
            } finally {
              writer.close();
            }
            return Files.asCharSink(file, UTF_8, FileWriteMode.APPEND);
          }
          return Files.asCharSink(file, UTF_8);
        }
    
        @Override
        public String getExpected(String string) {
          checkNotNull(string);
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 16 17:42:14 UTC 2025
    - 17.9K bytes
    - Viewed (0)
  4. guava/src/com/google/common/io/Files.java

       * @throws IOException if an I/O error occurs
       * @deprecated Prefer {@code asCharSink(to, charset).write(from)}.
       */
      @Deprecated
      @InlineMe(
          replacement = "Files.asCharSink(to, charset).write(from)",
          imports = "com.google.common.io.Files")
      public static void write(CharSequence from, File to, Charset charset) throws IOException {
        asCharSink(to, charset).write(from);
      }
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 32.9K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/io/Files.java

       * @throws IOException if an I/O error occurs
       * @deprecated Prefer {@code asCharSink(to, charset).write(from)}.
       */
      @Deprecated
      @InlineMe(
          replacement = "Files.asCharSink(to, charset).write(from)",
          imports = "com.google.common.io.Files")
      public static void write(CharSequence from, File to, Charset charset) throws IOException {
        asCharSink(to, charset).write(from);
      }
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 32.9K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/ByteSinkTester.java

        CharSinkFactory charSinkFactory = SourceSinkFactories.asCharSinkFactory(factory);
        suite.addTest(
            CharSinkTester.suiteForString(
                name + ".asCharSink[Charset]", charSinkFactory, string, desc));
        return suite;
      }
    
      private static TestSuite suiteForBytes(
          String name, ByteSinkFactory factory, String desc, byte[] bytes) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 4K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/io/ByteSinkTester.java

        CharSinkFactory charSinkFactory = SourceSinkFactories.asCharSinkFactory(factory);
        suite.addTest(
            CharSinkTester.suiteForString(
                name + ".asCharSink[Charset]", charSinkFactory, string, desc));
        return suite;
      }
    
      private static TestSuite suiteForBytes(
          String name, ByteSinkFactory factory, String desc, byte[] bytes) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 4K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/io/FilesTest.java

                SourceSinkFactories.fileCharSourceFactory(),
                false));
        suite.addTest(
            CharSinkTester.tests(
                "Files.asCharSink[File, Charset]", SourceSinkFactories.fileCharSinkFactory()));
        suite.addTest(
            CharSinkTester.tests(
                "Files.asCharSink[File, Charset, APPEND]",
                SourceSinkFactories.appendingFileCharSinkFactory()));
        suite.addTestSuite(FilesTest.class);
        return suite;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 22.1K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/io/CharSink.java

     *       doing something and finally closing the writer that was opened.
     * </ul>
     *
     * <p>Any {@link ByteSink} may be viewed as a {@code CharSink} with a specific {@linkplain Charset
     * character encoding} using {@link ByteSink#asCharSink(Charset)}. Characters written to the
     * resulting {@code CharSink} will written to the {@code ByteSink} as encoded bytes.
     *
     * @since 14.0
     * @author Colin Decker
     */
    @J2ktIncompatible
    @GwtIncompatible
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Apr 14 16:07:06 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  10. guava-tests/test/com/google/common/io/FilesTest.java

                SourceSinkFactories.fileCharSourceFactory(),
                false));
        suite.addTest(
            CharSinkTester.tests(
                "Files.asCharSink[File, Charset]", SourceSinkFactories.fileCharSinkFactory()));
        suite.addTest(
            CharSinkTester.tests(
                "Files.asCharSink[File, Charset, APPEND]",
                SourceSinkFactories.appendingFileCharSinkFactory()));
        suite.addTestSuite(FilesTest.class);
        return suite;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Jul 14 14:44:08 UTC 2025
    - 22.1K bytes
    - Viewed (0)
Back to top