ó 9(Zc@sVdZddlmZddlmZdefd„ƒYZdefd„ƒYZdS( s5Helper stream utility objects for AWS Encryption SDK.iÿÿÿÿ(t ObjectProxy(tActionNotAllowedErrortROStreamcBseZdZd„ZRS(s³Provides a read-only interface on top of a file-like object. Used to provide MasterKeyProviders with read-only access to plaintext. :param wrapped: File-like object cCstdƒ‚dS(sSBlocks calls to write. :raises ActionNotAllowedError: when called s%Write not allowed on ROStream objectsN(R(tselftb((sU/tmp/pip-build-wDUJoH/aws-encryption-sdk/aws_encryption_sdk/internal/utils/streams.pytwrites(t__name__t __module__t__doc__R(((sU/tmp/pip-build-wDUJoH/aws-encryption-sdk/aws_encryption_sdk/internal/utils/streams.pyRst TeeStreamcBs)eZdZdZd„Zdd„ZRS(sóProvides a ``tee``-like interface on top of a file-like object, which collects read bytes into a local :class:`io.BytesIO`. :param wrapped: File-like object :param tee: Stream to copy read bytes into. :type tee: io.BaseIO cCs#tt|ƒj|ƒ||_dS(sCreates the local tee stream.N(tsuperR t__init__t_TeeStream__tee(Rtwrappedttee((sU/tmp/pip-build-wDUJoH/aws-encryption-sdk/aws_encryption_sdk/internal/utils/streams.pyR .scCs&|jj|ƒ}|jj|ƒ|S(syReads data from source, copying it into ``tee`` before returning. :param int b: number of bytes to read (t __wrapped__treadR R(RRtdata((sU/tmp/pip-build-wDUJoH/aws-encryption-sdk/aws_encryption_sdk/internal/utils/streams.pyR3sN(RRRtNoneR R R(((sU/tmp/pip-build-wDUJoH/aws-encryption-sdk/aws_encryption_sdk/internal/utils/streams.pyR #s N(RtwraptRtaws_encryption_sdk.exceptionsRRR (((sU/tmp/pip-build-wDUJoH/aws-encryption-sdk/aws_encryption_sdk/internal/utils/streams.pyt s