Ejemplo 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];
 }
Ejemplo 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;
 }
Ejemplo n.º 3
0
 public TarInputStream(Stream inputStream, int blockFactor)
 {
     this.inputStream = inputStream;
     tarBuffer = TarBuffer.CreateInputTarBuffer(inputStream, blockFactor);
 }