public ME2PCCObject(String path)
{
lzo = new SaltLZOHelper();
fullname = path;
BitConverter.IsLittleEndian = true;
DebugOutput.PrintLn("Load file : " + path);
pccFileName = Path.GetFullPath(path);
MemoryStream tempStream = new MemoryStream();
if (!File.Exists(pccFileName))
throw new FileNotFoundException("PCC file not found");
using (FileStream fs = new FileStream(pccFileName, FileMode.Open, FileAccess.Read))
{
FileInfo tempInfo = new FileInfo(pccFileName);
tempStream.WriteFromStream(fs, tempInfo.Length);
if (tempStream.Length != tempInfo.Length)
{
throw new FileLoadException("File not fully read in. Try again later");
}
}
LoadHelper(tempStream);
}