All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jglrxavpok.hephaistos.data.DataSource.kt Maven / Gradle / Ivy

There is a newer version: 2.6.1
Show newest version
package org.jglrxavpok.hephaistos.data

import java.io.Closeable
import java.io.DataInput
import java.io.DataOutput
import java.io.IOException

interface DataSource: DataInput, DataOutput, Closeable {

    @Throws(IOException::class)
    fun seek(position: Long)

    @Throws(IOException::class)
    fun length(): Long

    @Throws(IOException::class)
    fun setLength(newLength: Long)

    @Throws(IOException::class)
    fun writeByte(pos: Long, b: Byte)

    @Throws(IOException::class)
    fun writeBytes(pos: Long, bytes: ByteArray)

    @Throws(IOException::class)
    fun writeInt(pos: Long, int: Int)

    @Throws(IOException::class)
    fun readBytes(pos: Long, destination: ByteArray)

    @Throws(IOException::class)
    fun readByte(pos: Long): Byte

    @Throws(IOException::class)
    fun readInt(pos: Long): Int

} 




© 2015 - 2024 Weber Informatics LLC | Privacy Policy