nativeMain.kotlinx.io.core.Output.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlinx-io-linuxx64 Show documentation
Show all versions of kotlinx-io-linuxx64 Show documentation
IO support libraries for Kotlin
package kotlinx.io.core
import kotlinx.cinterop.*
actual interface Output : Appendable, Closeable {
@Deprecated(
"Implementing this interface is highly experimental. Extend AbstractOutput instead.",
level = DeprecationLevel.HIDDEN
)
@Suppress("unused")
actual val doNotImplementOutputButExtendAbstractOutputInstead: Nothing
@Deprecated("Write with writeXXXLittleEndian or do X.reverseByteOrder() and then writeXXX instead.")
actual var byteOrder: ByteOrder
actual fun writeByte(v: Byte)
actual fun writeShort(v: Short)
actual fun writeInt(v: Int)
actual fun writeLong(v: Long)
actual fun writeFloat(v: Float)
actual fun writeDouble(v: Double)
actual fun writeFully(src: ByteArray, offset: Int, length: Int)
actual fun writeFully(src: ShortArray, offset: Int, length: Int)
actual fun writeFully(src: IntArray, offset: Int, length: Int)
actual fun writeFully(src: LongArray, offset: Int, length: Int)
actual fun writeFully(src: FloatArray, offset: Int, length: Int)
actual fun writeFully(src: DoubleArray, offset: Int, length: Int)
actual fun writeFully(src: IoBuffer, length: Int)
fun writeFully(src: CPointer, offset: Int, length: Int)
fun writeFully(src: CPointer, offset: Long, length: Long)
actual fun append(csq: CharArray, start: Int, end: Int): Appendable
actual fun fill(n: Long, v: Byte)
actual fun flush()
actual override fun close()
}
fun Output.writeFully(src: ByteArray) {
writeFully(src, 0, src.size)
}
fun Output.writeFully(src: ShortArray) {
writeFully(src, 0, src.size)
}
fun Output.writeFully(src: IntArray) {
writeFully(src, 0, src.size)
}
fun Output.writeFully(src: LongArray) {
writeFully(src, 0, src.size)
}
fun Output.writeFully(src: FloatArray) {
writeFully(src, 0, src.size)
}
fun Output.writeFully(src: DoubleArray) {
writeFully(src, 0, src.size)
}
fun Output.writeFully(src: IoBuffer) {
writeFully(src, src.readRemaining)
}
fun Output.fill(n: Long) {
fill(n, 0)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy