CreateInputTarBuffer() public static method

Create TarBuffer for reading with default BlockFactor
public static CreateInputTarBuffer ( Stream inputStream ) : TarBuffer
inputStream Stream Stream to buffer
return TarBuffer
示例#1
0
 public static TarBuffer CreateInputTarBuffer(Stream inputStream)
 {
     if (inputStream == null)
     {
         throw new ArgumentNullException("inputStream");
     }
     return(TarBuffer.CreateInputTarBuffer(inputStream, 20));
 }
示例#2
0
 public TarInputStream(Stream inputStream, int blockFactor)
 {
     this.inputStream = inputStream;
     this.buffer      = TarBuffer.CreateInputTarBuffer(inputStream, blockFactor);
     this.readBuf     = null;
     this.hasHitEOF   = false;
     this.eFactory    = null;
 }
示例#3
0
 /// <summary>
 /// Construct a TarInputStream with user specified block factor
 /// </summary>
 /// <param name="inputStream">stream to source data from</param>
 /// <param name="blockFactor">block factor to apply to archive</param>
 public TarInputStream(Stream inputStream, int blockFactor)
 {
     this.inputStream = inputStream;
     tarBuffer        = TarBuffer.CreateInputTarBuffer(inputStream, blockFactor);
 }
示例#4
0
 /// <summary>
 /// Construct a TarInputStream with user specified block factor
 /// </summary>
 /// <param name="inputStream">stream to source data from</param>
 /// <param name="blockFactor">block factor to apply to archive</param>
 /// <param name="nameEncoding">The <see cref="Encoding"/> used for the Name fields, or null for ASCII only</param>
 public TarInputStream(Stream inputStream, int blockFactor, Encoding nameEncoding)
 {
     this.inputStream = inputStream;
     tarBuffer        = TarBuffer.CreateInputTarBuffer(inputStream, blockFactor);
     encoding         = nameEncoding;
 }