CreateOutputTarBuffer() public static method

Construct TarBuffer for writing with default BlockFactor
public static CreateOutputTarBuffer ( Stream outputStream ) : TarBuffer
outputStream Stream output stream for buffer
return TarBuffer
Beispiel #1
0
 public static TarBuffer CreateOutputTarBuffer(Stream outputStream)
 {
     if (outputStream == null)
     {
         throw new ArgumentNullException("outputStream");
     }
     return(TarBuffer.CreateOutputTarBuffer(outputStream, 20));
 }
Beispiel #2
0
        public TarOutputStream(Stream outputStream, int blockFactor)
        {
            this.outputStream = outputStream ?? throw new ArgumentNullException(nameof(outputStream));
            buffer            = TarBuffer.CreateOutputTarBuffer(outputStream, blockFactor);

            assemblyBuffer = new byte[TarBuffer.BlockSize];
            blockBuffer    = new byte[TarBuffer.BlockSize];
        }
Beispiel #3
0
 public TarOutputStream(Stream outputStream, int blockFactor)
 {
     this.outputStream = outputStream;
     this.buffer       = TarBuffer.CreateOutputTarBuffer(outputStream, blockFactor);
     this.debug        = false;
     this.assemLen     = 0;
     this.assemBuf     = new byte[0x200];
     this.blockBuf     = new byte[0x200];
 }
Beispiel #4
0
        /// <summary>
        /// Construct TarOutputStream with user specified block factor
        /// </summary>
        /// <param name="outputStream">stream to write to</param>
        /// <param name="blockFactor">blocking factor</param>
        public TarOutputStream(Stream outputStream, int blockFactor)
        {
            this.outputStream = outputStream;
            buffer            = TarBuffer.CreateOutputTarBuffer(outputStream, blockFactor);

            debug    = false;
            assemLen = 0;
            assemBuf = new byte[TarBuffer.BlockSize];
            blockBuf = new byte[TarBuffer.BlockSize];
        }
Beispiel #5
0
 public TarOutputStream(Stream outputStream, int blockFactor)
 {
     if (outputStream == null)
     {
         throw new ArgumentNullException("outputStream");
     }
     this.outputStream   = outputStream;
     this.buffer         = TarBuffer.CreateOutputTarBuffer(outputStream, blockFactor);
     this.assemblyBuffer = new byte[0x200];
     this.blockBuffer    = new byte[0x200];
 }
Beispiel #6
0
        /// <summary>
        /// Construct TarOutputStream with user specified block factor
        /// </summary>
        /// <param name="outputStream">stream to write to</param>
        /// <param name="blockFactor">blocking factor</param>
        public TarOutputStream(Stream outputStream, int blockFactor)
        {
            if (outputStream == null)
            {
                throw new ArgumentNullException(SerialportSample.XWUtils.nameof(outputStream));
            }

            this.outputStream = outputStream;
            buffer            = TarBuffer.CreateOutputTarBuffer(outputStream, blockFactor);

            assemblyBuffer = new byte[TarBuffer.BlockSize];
            blockBuffer    = new byte[TarBuffer.BlockSize];
        }
 public TarOutputStream(Stream outputStream, int blockFactor)
     : this()
 {
     //IL_000e: Unknown result type (might be due to invalid IL or missing references)
     if (outputStream == null)
     {
         throw new ArgumentNullException("outputStream");
     }
     this.outputStream = outputStream;
     buffer            = TarBuffer.CreateOutputTarBuffer(outputStream, blockFactor);
     assemblyBuffer    = new byte[512];
     blockBuffer       = new byte[512];
 }
Beispiel #8
0
        /// <summary>
        /// Construct TarOutputStream with user specified block factor
        /// </summary>
        /// <param name="outputStream">stream to write to</param>
        /// <param name="blockFactor">blocking factor</param>
        /// <param name="nameEncoding">The <see cref="Encoding"/> used for the Name fields, or null for ASCII only</param>
        public TarOutputStream(Stream outputStream, int blockFactor, Encoding nameEncoding)
        {
            if (outputStream == null)
            {
                throw new ArgumentNullException(nameof(outputStream));
            }

            this.outputStream = outputStream;
            buffer            = TarBuffer.CreateOutputTarBuffer(outputStream, blockFactor);

            assemblyBuffer = new byte[TarBuffer.BlockSize];
            blockBuffer    = new byte[TarBuffer.BlockSize];

            this.nameEncoding = nameEncoding;
        }