Esempio n. 1
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];
 }
Esempio n. 2
0
 public static TarBuffer CreateInputTarBuffer(Stream inputStream, int blockFactor)
 {
     if (inputStream == null)
     {
         throw new ArgumentNullException("inputStream");
     }
     if (blockFactor <= 0)
     {
         throw new ArgumentOutOfRangeException("blockFactor", "Factor cannot be negative");
     }
     TarBuffer buffer = new TarBuffer {
         inputStream = inputStream,
         outputStream = null
     };
     buffer.Initialize(blockFactor);
     return buffer;
 }
Esempio n. 3
0
 public TarInputStream(Stream inputStream, int blockFactor)
 {
     this.inputStream = inputStream;
     this.tarBuffer = TarBuffer.CreateInputTarBuffer(inputStream, blockFactor);
 }