コード例 #1
0
ファイル: ZipEntryFile.cs プロジェクト: nomit007/f4
        public override InStream @in(Long bufSize)
        {
            try
              {
            System.IO.Stream ins;
            if (m_parent is Zip)
            {
              // never buffer if using ZipInputStream
              ins = new ZipEntryInputStream((m_parent as Zip).m_zipIn);
            }
            else
            {
              ins = (m_parent as ZipFile).GetInputStream(m_entry);

              // buffer if specified
              if (bufSize != null && bufSize.longValue() != 0)
            ins = new System.IO.BufferedStream(ins, bufSize.intValue());
            }

            // return as fan stream
            return new SysInStream(ins);
              }
              catch (System.IO.IOException e)
              {
            throw IOErr.make(e).val;
              }
        }
コード例 #2
0
        public override InStream @in(Long bufSize)
        {
            try
            {
                System.IO.Stream ins;
                if (m_parent is Zip)
                {
                    // never buffer if using ZipInputStream
                    ins = new ZipEntryInputStream((m_parent as Zip).m_zipIn);
                }
                else
                {
                    ins = (m_parent as ZipFile).GetInputStream(m_entry);

                    // buffer if specified
                    if (bufSize != null && bufSize.longValue() != 0)
                    {
                        ins = new System.IO.BufferedStream(ins, bufSize.intValue());
                    }
                }

                // return as fan stream
                return(new SysInStream(ins));
            }
            catch (System.IO.IOException e)
            {
                throw IOErr.make(e).val;
            }
        }