Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 33 for Channels (0.71 sec)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache2/FileOperator.kt

    import java.io.IOException
    import java.nio.channels.FileChannel
    import okio.Buffer
    
    /**
     * Read and write a target file. Unlike Okio's built-in `Okio.source(java.io.File file)` and `Okio.sink(java.io.File file)`
     * this class offers:
     *
     *  * **Read/write:** read and write using the same operator.
     *  * **Random access:** access any position within the file.
     *  * **Shared channels:** read and write a file channel that's shared between
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/nio/ChannelUtil.java

            assertArgumentNotNull("channel", channel);
    
            try {
                return channel.size();
            } catch (final IOException e) {
                throw new IORuntimeException(e);
            }
        }
    
        /**
         * Reads the contents of the file channel into a byte buffer.
         *
         * @param channel
         *            The file channel. Must not be {@literal null}.
         * @param buffer
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  3. android/guava-tests/test/com/google/common/io/PackageSanityTests.java

     */
    
    package com.google.common.io;
    
    import static java.nio.charset.StandardCharsets.UTF_8;
    
    import com.google.common.testing.AbstractPackageSanityTests;
    import java.lang.reflect.Method;
    import java.nio.channels.FileChannel.MapMode;
    import java.nio.charset.CharsetEncoder;
    import org.jspecify.annotations.NullUnmarked;
    
    /**
     * Basic sanity tests for the entire package.
     *
     * @author Ben Yu
     */
    
    @NullUnmarked
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/io/Files.java

        try {
          RandomAccessFile raf =
              closer.register(new RandomAccessFile(file, mode == MapMode.READ_ONLY ? "r" : "rw"));
          FileChannel channel = closer.register(raf.getChannel());
          return channel.map(mode, 0, size == -1 ? channel.size() : size);
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      /**
    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. okhttp/src/jvmTest/kotlin/okhttp3/ChannelSocketFactory.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3
    
    import java.net.InetAddress
    import java.net.Socket
    import java.nio.channels.SocketChannel
    import javax.net.SocketFactory
    
    class ChannelSocketFactory : SocketFactory() {
      override fun createSocket(): Socket = SocketChannel.open().socket()
    
      override fun createSocket(
        host: String,
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  6. guava/src/com/google/common/io/Files.java

        try {
          RandomAccessFile raf =
              closer.register(new RandomAccessFile(file, mode == MapMode.READ_ONLY ? "r" : "rw"));
          FileChannel channel = closer.register(raf.getChannel());
          return channel.map(mode, 0, size == -1 ? channel.size() : size);
        } catch (Throwable e) {
          throw closer.rethrow(e);
        } finally {
          closer.close();
        }
      }
    
      /**
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Tue May 13 17:27:14 UTC 2025
    - 32.9K bytes
    - Viewed (0)
  7. guava/src/com/google/common/io/ByteStreams.java

       * <ol>
       *   <li>Use sendfile(2) or equivalent. Requires that both the input channel and the output
       *       channel have their own file descriptors. Generally this only happens when both channels
       *       are files or sockets. This performs zero copies - the bytes never enter userspace.
       *   <li>Use mmap(2) or equivalent. Requires that either the input channel or the output channel
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 31.1K bytes
    - Viewed (0)
  8. okhttp-testing-support/src/main/kotlin/okhttp3/DelegatingSSLSocket.kt

     */
    package okhttp3
    
    import java.io.IOException
    import java.io.InputStream
    import java.io.OutputStream
    import java.net.InetAddress
    import java.net.SocketAddress
    import java.net.SocketException
    import java.nio.channels.SocketChannel
    import java.util.function.BiFunction
    import javax.net.ssl.HandshakeCompletedListener
    import javax.net.ssl.SSLParameters
    import javax.net.ssl.SSLSession
    import javax.net.ssl.SSLSocket
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/eventbus/EventBus.java

     * href="https://kotlinlang.org/docs/coroutines-guide.html">Kotlin coroutines</a>, including <a
     * href="https://kotlinlang.org/docs/flow.html">Flow</a> and <a
     * href="https://kotlinlang.org/docs/channels.html">Channels</a>. Yet other usages are better served
     * by individual libraries that provide specialized support for particular use cases.
     *
     * <p>Disadvantages of EventBus include:
     *
     * <ul>
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 21 03:10:51 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  10. src/main/java/org/codelibs/core/io/FileUtil.java

            final FileInputStream is = InputStreamUtil.create(file);
            try {
                final FileChannel channel = is.getChannel();
                final ByteBuffer buffer = ByteBuffer.allocate((int) ChannelUtil.size(channel));
                ChannelUtil.read(channel, buffer);
                return buffer.array();
            } finally {
                CloseableUtil.close(is);
            }
        }
    
        /**
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Thu Jul 31 08:16:49 UTC 2025
    - 8.8K bytes
    - Viewed (0)
Back to top