Package dev.relism.flash.bytes


package dev.relism.flash.bytes
  • Class
    Description
    Capability interface for a ByteView that is a contiguous slice of a single backing byte[] — as opposed to a SegmentedByteView, which spans several arrays and cannot expose a single (array, offset) pair.
    The single home for protocol-neutral byte scanning: single-byte search, the four-byte \r\n\r\n header-terminator search (SWAR-accelerated), case-insensitive comparison, comma-separated token-list scanning (Connection: a, b, c), RFC 9110 tchar validation, and the case-insensitive header-name hash Http1HeaderMap's
    Index-based writer into a growable byte[] scratch buffer.
    The allocation-free idiom for returning two ints from a method without an object: pack both into one long, unpack at the call site.
    per-call new ByteView() { ... } anonymous-class allocation that used to live in Http1HeaderMap.view, QueryParams.view, and PathParams.view: instead of allocating a fresh view object (plus its capturing instance) on every call, a small SlicePool of these hands out an existing instance, repositioned in place.
    A ByteView over up to K discontiguous byte[] segments, presented as one logical byte sequence.
    A small, fixed-size ring of PooledSlice instances — one per ConnectionScratch- Http1HeaderMap.view, QueryParams.view, PathParams.view).