Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for getChannel (0.1 sec)

  1. okhttp/src/test/java/okhttp3/internal/cache2/FileOperatorTest.kt

          FileOperator(
            randomAccessFile!!.getChannel(),
          )
        val buffer = Buffer()
        operator.read(0, buffer, 5)
        assertThat(buffer.readUtf8()).isEqualTo("Hello")
        operator.read(4, buffer, 5)
        assertThat(buffer.readUtf8()).isEqualTo("o, Wo")
      }
    
      @Test
      fun write() {
        val operator =
          FileOperator(
            randomAccessFile!!.getChannel(),
          )
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.8K bytes
    - Viewed (0)
  2. src/main/java/org/codelibs/core/io/FileUtil.java

        public static byte[] readBytes(final File file) {
            assertArgumentNotNull("file", file);
    
            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 {
    Registered: Fri Nov 01 20:58:10 UTC 2024
    - Last Modified: Thu Mar 07 01:59:08 UTC 2024
    - 9K bytes
    - Viewed (0)
  3. .teamcity/.mvn/wrapper/MavenWrapperDownloader.java

            }
            URL website = new URL(urlString);
            ReadableByteChannel rbc;
            rbc = Channels.newChannel(website.openStream());
            FileOutputStream fos = new FileOutputStream(destination);
            fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);
            fos.close();
            rbc.close();
        }
    
    Registered: Wed Nov 06 11:36:14 UTC 2024
    - Last Modified: Wed Feb 26 01:48:39 UTC 2020
    - 4.8K bytes
    - Viewed (0)
  4. okhttp-testing-support/src/main/kotlin/okhttp3/DelegatingSSLSocket.kt

        return delegate!!.trafficClass
      }
    
      @Throws(IOException::class)
      override fun sendUrgentData(value: Int) {
        delegate!!.sendUrgentData(value)
      }
    
      override fun getChannel(): SocketChannel {
        return delegate!!.channel
      }
    
      override fun getHandshakeSession(): SSLSession {
        return delegate!!.handshakeSession
      }
    
      override fun getApplicationProtocol(): String {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.9K bytes
    - Viewed (0)
Back to top