RangeCheckedHttpChannel

class RangeCheckedHttpChannel(url: URL) : UrlFileChannel(source)

A PMTiles channel over HTTP range requests that only accepts the bytes it asked for. A 200 that ignored the Range header and a 206 whose Content-Range names other bytes both throw IOException. An ETag that differs from the first one seen, or goes missing after it, and a 416 for a range that used to exist throw ArchiveChangedException. Only a 404 throws FileNotFoundException.

Constructors

Link copied to clipboard
constructor(url: URL)

Properties

Link copied to clipboard
var etag: String?

The ETag of the first response, which every later response must match.

Link copied to clipboard
override val isOpen: Boolean

Functions

Link copied to clipboard
fun close()
Link copied to clipboard
open fun force(metaData: Boolean)
Link copied to clipboard
Link copied to clipboard
open fun lock(position: Long, size: Long, shared: Boolean): FileLock?
fun lock(): FileLock?
Link copied to clipboard
open fun map(mode: FileChannel.MapMode?, position: Long, size: Long): MappedByteBuffer?
open fun map(mode: FileChannel.MapMode?, offset: Long, size: Long, arena: Arena?): MemorySegment?
Link copied to clipboard
open fun position(): Long
open fun position(newPosition: Long): FileChannel?
Link copied to clipboard
open fun read(dst: ByteBuffer?): Int
open fun read(dsts: Array<out ByteBuffer?>?, offset: Int, length: Int): Long
fun read(dsts: Array<out ByteBuffer?>?): Long
open override fun read(dst: ByteBuffer, pos: Long): Int
Link copied to clipboard
open fun size(): Long
Link copied to clipboard
open fun transferFrom(src: ReadableByteChannel?, position: Long, count: Long): Long
Link copied to clipboard
open fun transferTo(position: Long, count: Long, target: WritableByteChannel?): Long
Link copied to clipboard
open fun truncate(size: Long): FileChannel?
Link copied to clipboard
open fun tryLock(position: Long, size: Long, shared: Boolean): FileLock?
Link copied to clipboard
open fun write(src: ByteBuffer?): Int
open fun write(src: ByteBuffer?, position: Long): Int
open fun write(srcs: Array<out ByteBuffer?>?, offset: Int, length: Int): Long
fun write(srcs: Array<out ByteBuffer?>?): Long