UNPKG

@adobe/pdfservices-node-sdk

Version:

The Adobe PDF Services Node.js SDK provides APIs for creating, combining, exporting and manipulating PDFs.

50 lines 1.62 kB
"use strict"; /* * Copyright 2024 Adobe * All Rights Reserved. * * NOTICE: Adobe permits you to use, modify, and distribute this file in * accordance with the terms of the Adobe license agreement accompanying * it. If you have received this file from a source other than Adobe, * then your use, modification, or distribution of it requires the prior * written permission of Adobe. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.StreamAsset = void 0; const ObjectUtil_1 = require("../internal/util/ObjectUtil"); const StringUtil_1 = require("../internal/util/StringUtil"); /** * This class encapsulates read stream and the media type of {@link Asset}. */ class StreamAsset { /** * Construct an instance of `StreamAsset`. * * @param readStream - read stream of the asset. Cannot be undefined. * @param mimeType - mime type of the read stream. Cannot be undefined. */ constructor(readStream, mimeType) { ObjectUtil_1.ObjectUtil.requireNonNullOrUndefined(readStream, "Read Stream"); StringUtil_1.StringUtil.requireNonBlank(mimeType, "Mime Type"); this._readStream = readStream; this._mimeType = mimeType; } /** * Returns the read stream of the asset. * * @returns Read Stream of the asset. */ get readStream() { return this._readStream; } /** * Returns the mime type of the asset. * * @returns Mime Type of the asset. */ get mimeType() { return this._mimeType; } } exports.StreamAsset = StreamAsset; //# sourceMappingURL=StreamAsset.js.map