Esempio n. 1
0
 public TarOutputStream(Stream outputStream, int blockFactor)
 {
     if (outputStream == null)
     {
         throw new ArgumentNullException("outputStream");
     }
     this.outputStream = outputStream;
     buffer = TarBuffer.CreateOutputTarBuffer(outputStream, blockFactor);
     assemblyBuffer = new byte[0x200];
     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;
     tarBuffer = TarBuffer.CreateInputTarBuffer(inputStream, blockFactor);
 }