Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 65 for SetBytes (0.26 sec)

  1. guava-tests/test/com/google/common/reflect/ClassPathTest.java

          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      private static Manifest manifest(String content) throws IOException {
        InputStream in = new ByteArrayInputStream(content.getBytes(US_ASCII));
        Manifest manifest = new Manifest();
        manifest.read(in);
        return manifest;
      }
    
      private static File fullpath(String path) {
        return new File(new File(path).toURI());
      }
    
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Mon Jul 10 17:06:37 GMT 2023
    - 27.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/hash/Crc32cHashFunctionTest.java

      public void testSomeOtherKnownValues() {
        assertCrc(0x22620404, "The quick brown fox jumps over the lazy dog".getBytes(UTF_8));
        assertCrc(0xE3069283, "123456789".getBytes(UTF_8));
        assertCrc(0xf3dbd4fe, "1234567890".getBytes(UTF_8));
        assertCrc(0xBFE92A83, "23456789".getBytes(UTF_8));
      }
    
      public void testAgainstSimplerImplementation() {
        Random r = new Random(1234567);
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Dec 23 18:30:33 GMT 2020
    - 6.5K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/io/TestCharSource.java

      private final TestByteSource byteSource;
    
      public TestCharSource(String content, TestOption... options) {
        this.byteSource = new TestByteSource(content.getBytes(UTF_8), options);
      }
    
      @Override
      public boolean wasStreamOpened() {
        return byteSource.wasStreamOpened();
      }
    
      @Override
      public boolean wasStreamClosed() {
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Fri Nov 09 21:39:24 GMT 2012
    - 1.4K bytes
    - Viewed (0)
  4. guava-tests/test/com/google/common/io/TestCharSink.java

      private final TestByteSink byteSink;
    
      public TestCharSink(TestOption... options) {
        this.byteSink = new TestByteSink(options);
      }
    
      public String getString() {
        return new String(byteSink.getBytes(), UTF_8);
      }
    
      @Override
      public boolean wasStreamOpened() {
        return byteSink.wasStreamOpened();
      }
    
      @Override
      public boolean wasStreamClosed() {
        return byteSink.wasStreamClosed();
      }
    Java
    - Registered: Fri Apr 12 12:43:09 GMT 2024
    - Last Modified: Fri Nov 09 21:39:24 GMT 2012
    - 2K bytes
    - Viewed (0)
  5. guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java

          // [9-127) includes all ascii non-control characters
          sb.append((char) (random.nextInt(127 - 9) + 9));
        }
        String string = sb.toString();
        sb.setLength(0);
        data = ByteSource.wrap(string.getBytes(charset));
      }
    
      @Benchmark
      public int timeCopy(int reps) throws IOException {
        int r = 0;
        final Charset localCharset = charset;
        final ByteSource localData = data;
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 5.2K bytes
    - Viewed (0)
  6. android/guava-tests/benchmark/com/google/common/io/ByteSourceAsCharSourceReadBenchmark.java

          // [9-127) includes all ascii non-control characters
          sb.append((char) (random.nextInt(127 - 9) + 9));
        }
        String string = sb.toString();
        sb.setLength(0);
        data = ByteSource.wrap(string.getBytes(charset));
      }
    
      @Benchmark
      public int timeCopy(int reps) throws IOException {
        int r = 0;
        final Charset localCharset = charset;
        final ByteSource localData = data;
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 5.2K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/io/CharSourceTester.java

        for (Entry<String, String> entry : TEST_STRINGS.entrySet()) {
          if (testAsByteSource) {
            suite.addTest(
                suiteForBytes(
                    factory, entry.getValue().getBytes(Charsets.UTF_8), name, entry.getKey(), true));
          } else {
            suite.addTest(suiteForString(factory, entry.getValue(), name, entry.getKey()));
          }
        }
        return suite;
      }
    
    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 void testToByteArray() throws IOException {
        URL resource = getClass().getResource("testdata/i18n.txt");
        assertThat(Resources.toByteArray(resource)).isEqualTo(I18N.getBytes(Charsets.UTF_8));
      }
    
      public void testReadLines() throws IOException {
        // TODO(chrisn): Check in a better resource
        URL resource = getClass().getResource("testdata/i18n.txt");
    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. guava-tests/test/com/google/common/hash/Murmur3Hash32Test.java

        assertHash(expected, murmur3_32().hashBytes(string.getBytes(charset)));
        assertHash(expected, murmur3_32_fixed().hashBytes(string.getBytes(charset)));
        assertHash(expected, murmur3_32().newHasher().putBytes(string.getBytes(charset)).hash());
        assertHash(expected, murmur3_32_fixed().newHasher().putBytes(string.getBytes(charset)).hash());
      }
    
      private boolean allBmp(String string) {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Sep 08 13:56:22 GMT 2021
    - 8.6K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/io/SourceSinkFactories.java

          @Override
          public CharSource createSource(String string) throws IOException {
            return factory.createSource(string.getBytes(Charsets.UTF_8)).asCharSource(Charsets.UTF_8);
          }
    
          @Override
          public String getExpected(String data) {
            return new String(factory.getExpected(data.getBytes(Charsets.UTF_8)), Charsets.UTF_8);
          }
    
          @Override
          public void tearDown() throws IOException {
    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)
Back to top