Example #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public Iso9660Handler(pspsharp.filesystems.umdiso.UmdIsoReader r) throws java.io.IOException
        public Iso9660Handler(UmdIsoReader r) : base(r, 0, 0)
        {
            sbyte[] sector;
            if (r.hasJolietExtension())
            {
                sector = r.readSector(UmdIsoReader.startSectorJoliet);
            }
            else
            {
                sector = r.readSector(UmdIsoReader.startSector);
            }
            System.IO.MemoryStream byteStream = new System.IO.MemoryStream(sector);

            byteStream.skip(157);             // reach rootDirTocHeader

            sbyte[] b = new sbyte[38];

            byteStream.Read(b, 0, b.Length);
            Iso9660File rootDirEntry = new Iso9660File(b, b.Length, r.hasJolietExtension());

            int  rootLBA  = rootDirEntry.LBA;
            long rootSize = rootDirEntry.Size;

            internalDir = new Iso9660Directory(r, rootLBA, rootSize);
        }