Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 21 - 22 of 22 for getContentLength (0.09 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt

          MockResponse()
            .setBody("ab")
            .setSocketPolicy(SocketPolicy.DISCONNECT_DURING_RESPONSE_BODY),
        )
        val connection = server.url("/").toUrl().openConnection()
        assertThat(connection.getContentLength()).isEqualTo(2)
        val inputStream = connection.getInputStream()
        assertThat(inputStream.read()).isEqualTo('a'.code)
        try {
          val byteRead = inputStream.read()
          // OpenJDK behavior: end of stream.
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Thu Jul 03 13:16:34 GMT 2025
    - 22.3K bytes
    - Click Count (0)
  2. src/main/java/jcifs/smb1/smb1/SmbFile.java

         * This URLConnection method just returns the result of {@code length()}.
         *
         * @return the length of this file or 0 if it refers to a directory
         */
    
        @Override
        public int getContentLength() {
            try {
                return (int) (length() & 0xFFFFFFFFL);
            } catch (final SmbException se) {}
            return 0;
        }
    
        /**
    Created: Sun Apr 05 00:10:12 GMT 2026
    - Last Modified: Sat Aug 30 05:58:03 GMT 2025
    - 112.2K bytes
    - Click Count (0)
Back to Top