mimekit-ts - v1.0.0
    Preparing search index...

    Class Unix2DosFilter

    A filter that converts Unix line endings to Windows/DOS line endings.

    Hierarchy (View Summary)

    Index
    outputBuffer?: Uint8Array<ArrayBufferLike>

    The reusable output buffer used by this filter.

    • Filter the specified input buffer.

      Parameters

      • input: Uint8Array

        The input buffer.

      • startIndex: number

        The starting index of the input buffer.

      • length: number

        The number of bytes of input to filter.

      Returns MimeFilterResult

      The filtered output range.

      input is not a Uint8Array.

      startIndex and length do not specify a valid range in input.

    • Filter the specified input buffer, flushing all internally buffered data to the output.

      Parameters

      • input: Uint8Array

        The input buffer.

      • startIndex: number

        The starting index of the input buffer.

      • length: number

        The number of bytes of input to filter.

      Returns MimeFilterResult

      The filtered output range.

      input is not a Uint8Array.

      startIndex and length do not specify a valid range in input.

    • Save the remaining input for the next round of processing.

      Parameters

      • input: Uint8Array

        The input buffer.

      • startIndex: number

        The starting index of the buffer to save.

      • length: number

        The length of the buffer to save, starting at startIndex.

      Returns void

    • Ensure that the output buffer is at least the specified size.

      Parameters

      • size: number

        The minimum size needed.

      • keep: boolean

        Whether the current output should be preserved.

      Returns Uint8Array

      The output buffer.

    • Filter the specified input buffer.

      Parameters

      • input: Uint8Array

        The input buffer.

      • startIndex: number

        The starting index of the input buffer.

      • length: number

        The length of the input buffer, starting at startIndex.

      • flush: boolean

        Whether all internally buffered data should be flushed to the output buffer.

      Returns MimeFilterResult

      The filtered output range.