/**
* Writes eficiently to a stream
*
* @param os the stream to write to
* @throws IOException on write error
*/
internal protected void WriteTo(Stream os)
{
byte[] tmp = DocWriter.GetISOBytes(number.ToString());
os.Write(tmp, 0, tmp.Length);
os.WriteByte((byte)' ');
tmp = DocWriter.GetISOBytes(generation.ToString());
os.Write(tmp, 0, tmp.Length);
os.Write(STARTOBJ, 0, STARTOBJ.Length);
objecti.ToPdf(writer, os);
os.Write(ENDOBJ, 0, ENDOBJ.Length);
}