Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 36 for copyInto (0.11 sec)

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

        StringBuilder builder = new StringBuilder();
    
        assertEquals(expected.length(), source.copyTo(builder));
    
        assertExpectedString(builder.toString());
      }
    
      public void testCopyTo_charSink() throws IOException {
        TestCharSink sink = new TestCharSink();
    
        assertEquals(expected.length(), source.copyTo(sink));
    
        assertExpectedString(sink.getString());
      }
    
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/io/ByteSourceTester.java

        ByteArrayOutputStream out = new ByteArrayOutputStream();
        source.copyTo(out);
        assertExpectedBytes(out.toByteArray());
      }
    
      public void testCopyTo_byteSink() throws IOException {
        final ByteArrayOutputStream out = new ByteArrayOutputStream();
        // HERESY! but it's ok just for this I guess
        source.copyTo(
            new ByteSink() {
              @Override
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Tue Jul 23 14:22:54 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  3. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/internal/IsProbablyUtf8.kt

     * signatures.
     */
    fun Buffer.isProbablyUtf8(): Boolean {
      try {
        val prefix = Buffer()
        val byteCount = size.coerceAtMost(64)
        copyTo(prefix, 0, byteCount)
        for (i in 0 until 16) {
          if (prefix.exhausted()) {
            break
          }
          val codePoint = prefix.readUtf8CodePoint()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Jan 07 16:05:34 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/Files.java

       * @deprecated Prefer {@code asCharSource(from, charset).copyTo(to)}.
       */
      @Deprecated
      @InlineMe(
          replacement = "Files.asCharSource(from, charset).copyTo(to)",
          imports = "com.google.common.io.Files")
      public
      static void copy(File from, Charset charset, Appendable to) throws IOException {
        asCharSource(from, charset).copyTo(to);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Jul 22 19:03:12 UTC 2024
    - 33.1K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/io/ByteSource.java

       *
       * @return the number of bytes copied
       * @throws IOException if an I/O error occurs while reading from this source or writing to {@code
       *     output}
       */
      @CanIgnoreReturnValue
      public long copyTo(OutputStream output) throws IOException {
        checkNotNull(output);
    
        Closer closer = Closer.create();
        try {
          InputStream in = closer.register(openStream());
          return ByteStreams.copy(in, output);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Sat Oct 19 00:26:48 UTC 2024
    - 26.2K bytes
    - Viewed (0)
  6. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt

            nameBuf.writeByte(utf8ByteCount.toInt())
            nameBuf.writeUtf8(label)
          }
          nameBuf.writeByte(0) // end
    
          nameBuf.copyTo(this, 0, nameBuf.size)
          writeShort(type)
          writeShort(1) // CLASS_IN
        }.readByteString()
    
      @Throws(Exception::class)
      fun decodeAnswers(
        hostname: String,
        byteString: ByteString,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt

              }
    
              // The buffer has the data we need. Read from there and return immediately.
              val bytesToRead = minOf(byteCount, upstreamPos - sourcePos)
              buffer.copyTo(sink, sourcePos - bufferPos, bytesToRead)
              sourcePos += bytesToRead
              return bytesToRead
            }
    
          // Read from the file.
          if (source == SOURCE_FILE) {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  8. guava/src/com/google/common/io/Files.java

       * @deprecated Prefer {@code asCharSource(from, charset).copyTo(to)}.
       */
      @Deprecated
      @InlineMe(
          replacement = "Files.asCharSource(from, charset).copyTo(to)",
          imports = "com.google.common.io.Files")
      public
      static void copy(File from, Charset charset, Appendable to) throws IOException {
        asCharSource(from, charset).copyTo(to);
      }
    
      /**
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Mon Jul 22 19:03:12 UTC 2024
    - 33.1K bytes
    - Viewed (0)
  9. build-logic-commons/basics/src/main/kotlin/gradlebuild/basics/classanalysis/AnalyzeAndShade.kt

        val entry = ZipEntry(entryName)
        entry.time = zipEntryBaseTimestamp
        putNextEntry(entry)
        BufferedInputStream(FileInputStream(sourceFile)).use { inputStream -> inputStream.copyTo(this) }
        closeEntry()
    }
    
    
    fun File.getClassSuperTypes(): Set<String> {
        if (!path.endsWith(".class")) {
            throw IllegalArgumentException("Not a class file: $path")
        }
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Mon Oct 28 12:55:30 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/collect/MinMaxPriorityQueue.java

      }
    
      @Override
      @J2ktIncompatible // Incompatible return type change. Use inherited (unoptimized) implementation
      public Object[] toArray() {
        Object[] copyTo = new Object[size];
        arraycopy(queue, 0, copyTo, 0, size);
        return copyTo;
      }
    
      /**
       * Returns the comparator used to order the elements in this queue. Obeys the general contract of
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Wed Oct 30 16:15:19 UTC 2024
    - 34.1K bytes
    - Viewed (0)
Back to top