Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for AsByteSource (0.27 sec)

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

       * @since 12.0
       * @deprecated Prefer {@code asByteSource(file).hash(hashFunction)}.
       */
      @Deprecated
      @InlineMe(
          replacement = "Files.asByteSource(file).hash(hashFunction)",
          imports = "com.google.common.io.Files")
      public
      static HashCode hash(File file, HashFunction hashFunction) throws IOException {
        return asByteSource(file).hash(hashFunction);
      }
    
      /**
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 15 16:12:13 GMT 2024
    - 33.1K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/io/MoreFilesTest.java

          assertThat(MoreFiles.equal(fooPath, barPath)).isFalse();
          assertThat(MoreFiles.equal(fooPath, fooPath)).isTrue();
          assertThat(MoreFiles.asByteSource(fooPath).contentEquals(MoreFiles.asByteSource(fooPath)))
              .isTrue();
    
          Path fooCopy = Files.copy(fooPath, fs.getPath("fooCopy"));
          assertThat(Files.isSameFile(fooPath, fooCopy)).isFalse();
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Jan 29 22:57:05 GMT 2024
    - 27.2K bytes
    - Viewed (0)
  3. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Thu Apr 06 12:56:11 GMT 2023
    - 12.7K bytes
    - Viewed (0)
  4. android/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 May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 12K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/io/FilesTest.java

        return suite;
      }
    
      public void testRoundTripSources() throws Exception {
        File asciiFile = getTestFile("ascii.txt");
        ByteSource byteSource = Files.asByteSource(asciiFile);
        assertSame(byteSource, byteSource.asCharSource(Charsets.UTF_8).asByteSource(Charsets.UTF_8));
      }
    
      public void testToByteArray() throws IOException {
        File asciiFile = getTestFile("ascii.txt");
        File i18nFile = getTestFile("i18n.txt");
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.2K bytes
    - Viewed (0)
  6. 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)
  7. guava-tests/test/com/google/common/io/FilesTest.java

        return suite;
      }
    
      public void testRoundTripSources() throws Exception {
        File asciiFile = getTestFile("ascii.txt");
        ByteSource byteSource = Files.asByteSource(asciiFile);
        assertSame(byteSource, byteSource.asCharSource(Charsets.UTF_8).asByteSource(Charsets.UTF_8));
      }
    
      public void testToByteArray() throws IOException {
        File asciiFile = getTestFile("ascii.txt");
        File i18nFile = getTestFile("i18n.txt");
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 06 17:04:31 GMT 2023
    - 22.2K bytes
    - Viewed (0)
  8. 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)
  9. 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)
  10. 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)
Back to top