protected internal void ReadDocObj() {
ArrayList streams = new ArrayList();
xrefObj = ArrayList.Repeat(null, xref.Length / 2);
for (int k = 2; k < xref.Length; k += 2) {
int pos = xref[k];
if (pos <= 0 || xref[k + 1] > 0)
continue;
tokens.Seek(pos);
tokens.NextValidToken();
if (tokens.TokenType != PRTokeniser.TK_NUMBER)
tokens.ThrowError("Invalid object number.");
objNum = tokens.IntValue;
tokens.NextValidToken();
if (tokens.TokenType != PRTokeniser.TK_NUMBER)
tokens.ThrowError("Invalid generation number.");
objGen = tokens.IntValue;
tokens.NextValidToken();
if (!tokens.StringValue.Equals("obj"))
tokens.ThrowError("Token 'obj' expected.");
PdfObject obj;
try {
obj = ReadPRObject();
if (obj.IsStream()) {
streams.Add(obj);
}
}
catch {
obj = null;
}
xrefObj[k / 2] = obj;
}
for (int k = 0; k < streams.Count; ++k) {
CheckPRStreamLength((PRStream)streams[k]);
}
ReadDecryptedDocObj();
if (objStmMark != null) {
foreach (DictionaryEntry entry in objStmMark) {
int n = (int)entry.Key;
IntHashtable h = (IntHashtable)entry.Value;
ReadObjStm((PRStream)xrefObj[n], h);
xrefObj[n] = null;
}
objStmMark = null;
}
xref = null;
}