Skip to content

//okio/okio/BufferedSource

BufferedSource

[js, native] interface BufferedSource : Source
[jvm] interface BufferedSource : Source, ReadableByteChannel

Functions

Name Summary
close [js, jvm, native]
Content
[js, jvm, native]
abstract override fun close()


equals [js, jvm, native]
Content
[js, jvm, native]
open operator override fun equals(other: Any?): Boolean


exhausted [js, jvm, native]
Content
[js, jvm, native]
abstract fun exhausted(): Boolean


hashCode [js, jvm, native]
Content
[js, jvm, native]
open override fun hashCode(): Int


indexOf [js, jvm, native]
Content
[js, jvm, native]
abstract fun indexOf(b: Byte): Long
[js, jvm, native]
abstract fun indexOf(b: Byte, fromIndex: Long): Long
[js, jvm, native]
abstract fun indexOf(b: Byte, fromIndex: Long, toIndex: Long): Long
[js, jvm, native]
abstract fun indexOf(bytes: ByteString): Long
[js, jvm, native]
abstract fun indexOf(bytes: ByteString, fromIndex: Long): Long


indexOfElement [js, jvm, native]
Content
[js, jvm, native]
abstract fun indexOfElement(targetBytes: ByteString): Long
[js, jvm, native]
abstract fun indexOfElement(targetBytes: ByteString, fromIndex: Long): Long


inputStream [jvm]
Brief description
Returns an input stream that reads from this source.
Content
abstract fun inputStream(): InputStream


isOpen [jvm]
Content
abstract override fun isOpen(): Boolean


peek [js, jvm, native]
Content
[js, jvm, native]
abstract fun peek(): BufferedSource


rangeEquals [js, jvm, native]
Content
[js, jvm, native]
abstract fun rangeEquals(offset: Long, bytes: ByteString): Boolean
[js, jvm, native]
abstract fun rangeEquals(offset: Long, bytes: ByteString, bytesOffset: Int, byteCount: Int): Boolean


read [js, jvm, native]
Content
[js, jvm, native]
abstract fun read(sink: ByteArray): Int
[js, jvm, native]
abstract fun read(sink: ByteArray, offset: Int, byteCount: Int): Int
[js, jvm, native]
abstract override fun read(sink: Buffer, byteCount: Long): Long
[jvm]
abstract override fun read(p0: ByteBuffer): Int


readAll [js, jvm, native]
Content
[js, jvm, native]
abstract fun readAll(sink: Sink): Long


readByte [js, jvm, native]
Content
[js, jvm, native]
abstract fun readByte(): Byte


readByteArray [js, jvm, native]
Content
[js, jvm, native]
abstract fun readByteArray(): ByteArray
[js, jvm, native]
abstract fun readByteArray(byteCount: Long): ByteArray


readByteString [js, jvm, native]
Content
[js, jvm, native]
abstract fun readByteString(): ByteString
[js, jvm, native]
abstract fun readByteString(byteCount: Long): ByteString


readDecimalLong [js, jvm, native]
Content
[js, jvm, native]
abstract fun readDecimalLong(): Long


readFully [js, jvm, native]
Content
[js, jvm, native]
abstract fun readFully(sink: ByteArray)
[js, jvm, native]
abstract fun readFully(sink: Buffer, byteCount: Long)


readHexadecimalUnsignedLong [js, jvm, native]
Content
[js, jvm, native]
abstract fun readHexadecimalUnsignedLong(): Long


readInt [js, jvm, native]
Content
[js, jvm, native]
abstract fun readInt(): Int


readIntLe [js, jvm, native]
Content
[js, jvm, native]
abstract fun readIntLe(): Int


readLong [js, jvm, native]
Content
[js, jvm, native]
abstract fun readLong(): Long


readLongLe [js, jvm, native]
Content
[js, jvm, native]
abstract fun readLongLe(): Long


readShort [js, jvm, native]
Content
[js, jvm, native]
abstract fun readShort(): Short


readShortLe [js, jvm, native]
Content
[js, jvm, native]
abstract fun readShortLe(): Short


readString [jvm]
Brief description
Removes all bytes from this, decodes them as charset, and returns the string.
Content
abstract fun readString(charset: Charset): String


[jvm]
Brief description
Removes byteCount bytes from this, decodes them as charset, and returns the string.
Content
abstract fun readString(byteCount: Long, charset: Charset): String


readUtf8 [js, jvm, native]
Content
[js, jvm, native]
abstract fun readUtf8(): String
[js, jvm, native]
abstract fun readUtf8(byteCount: Long): String


readUtf8CodePoint [js, jvm, native]
Content
[js, jvm, native]
abstract fun readUtf8CodePoint(): Int


readUtf8Line [js, jvm, native]
Content
[js, jvm, native]
abstract fun readUtf8Line(): String?


readUtf8LineStrict [js, jvm, native]
Content
[js, jvm, native]
abstract fun readUtf8LineStrict(): String
[js, jvm, native]
abstract fun readUtf8LineStrict(limit: Long): String


request [js, jvm, native]
Content
[js, jvm, native]
abstract fun request(byteCount: Long): Boolean


require [js, jvm, native]
Content
[js, jvm, native]
abstract fun require(byteCount: Long)


select [js, jvm, native]
Content
[js, jvm, native]
abstract fun select(options: ): Int


skip [js, jvm, native]
Content
[js, jvm, native]
abstract fun skip(byteCount: Long)


timeout [js, jvm, native]
Content
[js, jvm, native]
abstract override fun timeout(): Timeout


toString [js, jvm, native]
Content
[js, jvm, native]
open override fun toString(): String


Properties

Name Summary
buffer [js, jvm, native] abstract val buffer: Buffer

Inheritors

Name
Buffer