Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for EOFException (0.16 sec)

  1. okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/MessageDeflaterInflaterTest.kt

     * limitations under the License.
     */
    package okhttp3.internal.ws
    
    import assertk.assertThat
    import assertk.assertions.isEqualTo
    import assertk.assertions.isLessThan
    import java.io.EOFException
    import kotlin.test.assertFailsWith
    import okhttp3.TestUtil.fragmentBuffer
    import okio.Buffer
    import okio.ByteString
    import okio.ByteString.Companion.decodeHex
    import okio.ByteString.Companion.encodeUtf8
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 5K bytes
    - Viewed (0)
  2. okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http/HttpHeaders.kt

          val header = Buffer().writeUtf8(value(h))
          try {
            header.readChallengeHeader(result)
          } catch (e: EOFException) {
            Platform.get().log("Unable to parse challenge", Platform.WARN, e)
          }
        }
      }
      return result
    }
    
    @Throws(EOFException::class)
    private fun Buffer.readChallengeHeader(result: MutableList<Challenge>) {
      var peek: String? = null
    
      while (true) {
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon May 05 16:01:00 UTC 2025
    - 7.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/io/LittleEndianDataInputStream.java

       *
       * @return byte read from input
       * @throws IOException if an error is encountered while reading
       * @throws EOFException if the end of file (EOF) is encountered.
       */
      private byte readAndCheckByte() throws IOException, EOFException {
        int b1 = in.read();
    
        if (b1 == -1) {
          throw new EOFException();
        }
    
        return (byte) b1;
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Feb 12 03:49:18 UTC 2025
    - 7.3K bytes
    - Viewed (0)
  4. okhttp-logging-interceptor/src/main/kotlin/okhttp3/logging/internal/IsProbablyUtf8.kt

     * See the License for the specific language governing permissions and
     * limitations under the License.
     */
    package okhttp3.logging.internal
    
    import java.io.EOFException
    import okio.Buffer
    
    /**
     * Returns true if the body in question probably contains human readable text. Uses a small
     * sample of code points to detect unicode control characters commonly used in binary file
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sun Jan 07 16:05:34 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  5. guava-tests/test/com/google/common/io/LittleEndianDataInputStreamTest.java

        assertThrows(EOFException.class, () -> in.readUnsignedByte());
      }
    
      public void testReadUnsignedShort_eof() throws IOException {
        byte[] buf = {23};
        DataInput in = new LittleEndianDataInputStream(new ByteArrayInputStream(buf));
        assertThrows(EOFException.class, () -> in.readUnsignedShort());
      }
    
      @SuppressWarnings("DoNotCall")
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  6. okhttp/src/jvmTest/kotlin/okhttp3/internal/ws/WebSocketReaderTest.kt

        data.write("8a0548656c".decodeHex()) // Length = 5, "Hel"
        assertFailsWith<EOFException> {
          clientReader.processNextFrame()
        }
      }
    
      @Test fun serverIncompleteMessageBodyThrows() {
        data.write("818537fa213d7f9f4d".decodeHex()) // Length = 5, "Hel"
        assertFailsWith<EOFException> {
          serverReader.processNextFrame()
        }
      }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Fri Dec 27 13:39:56 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  7. okhttp-dnsoverhttps/src/main/kotlin/okhttp3/dnsoverhttps/DnsRecordCodec.kt

     * or implied. See the License for the specific language governing permissions and limitations under
     * the License.
     */
    
    package okhttp3.dnsoverhttps
    
    import java.io.EOFException
    import java.net.InetAddress
    import java.net.UnknownHostException
    import okio.Buffer
    import okio.ByteString
    import okio.utf8Size
    
    /**
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Mar 19 19:25:20 UTC 2025
    - 3.9K bytes
    - Viewed (0)
  8. okhttp-dnsoverhttps/src/test/java/okhttp3/dnsoverhttps/DnsOverHttpsTest.kt

    import assertk.assertions.containsExactlyInAnyOrder
    import assertk.assertions.hasMessage
    import assertk.assertions.isEqualTo
    import assertk.assertions.isInstanceOf
    import assertk.assertions.isNull
    import java.io.EOFException
    import java.io.File
    import java.io.IOException
    import java.net.InetAddress
    import java.net.UnknownHostException
    import java.util.concurrent.TimeUnit
    import mockwebserver3.MockResponse
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed Jun 18 12:28:21 UTC 2025
    - 11.7K bytes
    - Viewed (0)
  9. okhttp/src/jvmTest/kotlin/okhttp3/MultipartReaderTest.kt

            boundary = "simple boundary",
            source = Buffer().writeUtf8(multipart),
          )
    
        val part = parts.nextPart()!!
        assertFailsWith<EOFException> {
          part.body.readUtf8()
        }
    
        assertFailsWith<EOFException> {
          assertThat(parts.nextPart()).isNull()
        }
      }
    
      @Test fun `malformed headers`() {
        val multipart =
          """
          |--simple boundary
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Wed May 28 02:11:14 UTC 2025
    - 15.4K bytes
    - Viewed (0)
  10. guava/src/com/google/common/io/CharStreams.java

       * @throws EOFException if this stream reaches the end before skipping all the characters
       * @throws IOException if an I/O error occurs
       */
      public static void skipFully(Reader reader, long n) throws IOException {
        checkNotNull(reader);
        while (n > 0) {
          long amt = reader.skip(n);
          if (amt == 0) {
            throw new EOFException();
          }
          n -= amt;
        }
      }
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Jul 30 17:25:01 UTC 2025
    - 10.9K bytes
    - Viewed (0)
Back to top