import PDFDict from 'src/core/objects/PDFDict' ; import PDFStream from 'src/core/objects/PDFStream' ; import PDFContext from 'src/core/PDFContext' ; import { arrayAsString } from 'src/utils' ; class PDFRawStream extends PDFStream { static of = ( dict , contents ) => new PDFRawStream ( dict , contents ) ; readonly contents : Uint8Array ; private constructor ( dict , contents ) { super ( dict ) ; this . contents = contents ; } asUint8Array ( ) { return this . contents . slice ( ) ; } clone ( context ? ) { return PDFRawStream . of ( this . dict . clone ( context ) , this . contents . slice ( ) ) ; } getContentsString ( ) { return arrayAsString ( this . contents ) ; } getContents ( ) { return this . contents ; } getContentsSize ( ) { return this . contents . length ; } } export default PDFRawStream ;