Package net.targetr.wtm3.io
package net.targetr.wtm3.io
Stream framing, reusable byte buffers and serialization helpers for WTM3.
MetadataReader reads protocol headers;
LengthRestrictedInputStream bounds fixed-length
bodies; and ChunkedInputStream and
ChunkedOutputStream implement HTTP chunked transfer
framing. Monitored stream wrappers count transferred bytes for server statistics.
ReusableBuffer and
ReusableBufferList hold data for command and
WebSocket processing. The remaining helpers provide bounded stream reading
and draining, message digests, MIME-type lookup and JSON output through
SimpleJsonWriter.
- Author:
- Dr Michael Gardiner
-
ClassDescriptionReads a chunked input stream.Writes a chunked output stream.Tools for processing hashes.Prevents reading too much from an input stream.Prevents writing too much data to an output stream.Specifies the behavior when the write limit is reached.Reads HTTP metadata through CRLF-CRLF and pushes back any over-read body bytes.Maps resource path extensions to HTTP content types, including UTF-8 charset parameters for supported text formats.Keeps track of how many bytes are read from an input stream.Keeps track of how many bytes are written to an output stream.A reusable buffer of bytes.A list of reusable buffers.Minimal JSON writer for monitoring data, supporting nested maps, lists, numbers and null.Useful utilities for working with streams.