Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 23 for AsByteSource (0.18 sec)

  1. guava-tests/test/com/google/common/io/SourceSinkFactories.java

        checkNotNull(factory);
        return new ByteSourceFactory() {
          @Override
          public ByteSource createSource(byte[] data) throws IOException {
            return factory.createSource(new String(data, Charsets.UTF_8)).asByteSource(Charsets.UTF_8);
          }
    
          @Override
          public byte[] getExpected(byte[] data) {
            return factory.getExpected(new String(data, Charsets.UTF_8)).getBytes(Charsets.UTF_8);
          }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Thu Sep 09 17:57:59 GMT 2021
    - 17.9K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/io/CharSourceTest.java

      public static TestSuite suite() {
        TestSuite suite = new TestSuite();
        for (boolean asByteSource : new boolean[] {false, true}) {
          suite.addTest(
              CharSourceTester.tests(
                  "CharSource.wrap[CharSequence]",
                  SourceSinkFactories.stringCharSourceFactory(),
                  asByteSource));
          suite.addTest(
              CharSourceTester.tests(
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 13K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/CharSource.java

       * returned, rather than round-trip encoding. Subclasses that override this method should behave
       * the same way.
       *
       * @since 20.0
       */
      public ByteSource asByteSource(Charset charset) {
        return new AsByteSource(charset);
      }
    
      /**
       * Opens a new {@link Reader} for reading from this source. This method returns a new, independent
       * reader each time it is called.
       *
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 22.4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/io/SourceSinkFactory.java

     *
     * <p>A single {@code SourceSinkFactory} implementation generally corresponds to one specific way of
     * creating a source or sink, such as {@link Files#asByteSource(File)}. Implementations of {@code
     * SourceSinkFactory} for common.io are found in {@link SourceSinkFactories}.
     *
     * @param <S> the source or sink type
     * @param <T> the data type (byte[] or String)
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/io/ByteSource.java

        AsCharSource(Charset charset) {
          this.charset = checkNotNull(charset);
        }
    
        @Override
        public ByteSource asByteSource(Charset charset) {
          if (charset.equals(this.charset)) {
            return ByteSource.this;
          }
          return super.asByteSource(charset);
        }
    
        @Override
        public Reader openStream() throws IOException {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed May 17 14:35:11 GMT 2023
    - 26.2K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/io/SourceSinkFactory.java

     *
     * <p>A single {@code SourceSinkFactory} implementation generally corresponds to one specific way of
     * creating a source or sink, such as {@link Files#asByteSource(File)}. Implementations of {@code
     * SourceSinkFactory} for common.io are found in {@link SourceSinkFactories}.
     *
     * @param <S> the source or sink type
     * @param <T> the data type (byte[] or String)
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 3K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/io/CharSourceTester.java

        ByteSourceFactory byteSourceFactory = SourceSinkFactories.asByteSourceFactory(factory);
        suite.addTest(
            ByteSourceTester.suiteForBytes(
                byteSourceFactory, bytes, name + ".asByteSource[Charset]", desc, slice));
        return suite;
      }
    
      static TestSuite suiteForString(
          CharSourceFactory factory, String string, String name, String desc) {
    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)
  8. guava-tests/test/com/google/common/io/ResourcesTest.java

      public static TestSuite suite() {
        TestSuite suite = new TestSuite();
        suite.addTest(
            ByteSourceTester.tests(
                "Resources.asByteSource[URL]", SourceSinkFactories.urlByteSourceFactory(), true));
        suite.addTest(
            CharSourceTester.tests(
                "Resources.asCharSource[URL, Charset]",
                SourceSinkFactories.urlCharSourceFactory(),
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 6.8K bytes
    - Viewed (0)
  9. android/guava-tests/test/com/google/common/io/CharSourceTester.java

        ByteSourceFactory byteSourceFactory = SourceSinkFactories.asByteSourceFactory(factory);
        suite.addTest(
            ByteSourceTester.suiteForBytes(
                byteSourceFactory, bytes, name + ".asByteSource[Charset]", desc, slice));
        return suite;
      }
    
      static TestSuite suiteForString(
          CharSourceFactory factory, String string, String name, String desc) {
    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)
  10. android/guava-tests/test/com/google/common/io/ResourcesTest.java

      public static TestSuite suite() {
        TestSuite suite = new TestSuite();
        suite.addTest(
            ByteSourceTester.tests(
                "Resources.asByteSource[URL]", SourceSinkFactories.urlByteSourceFactory(), true));
        suite.addTest(
            CharSourceTester.tests(
                "Resources.asCharSource[URL, Charset]",
                SourceSinkFactories.urlCharSourceFactory(),
    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)
Back to top