/*
 * SDK Pullenti Unitext, version 4.33, fabruary 2026. Copyright (c) 2013-2026, Pullenti. All rights reserved. 
 * Non-Commercial Freeware and Commercial Software. 
 * This class is generated using the converter Unisharping (www.unisharping.ru) from Pullenti C# project. 
 * The latest version of the code is available on the site www.pullenti.ru
 */

package com.pullenti.unitext.internal.pdf;

public class PdfReference extends PdfObject {

    @Override
    public String toStringEx(int lev) {
        return ("[R 0 " + id + "]");
    }

    @Override
    public void write(com.pullenti.unisharp.Stream s) {
        try {
            byte[] buf = com.pullenti.unisharp.Utils.encodeCharset(java.nio.charset.Charset.forName("ASCII"), (((Integer)this.getWriteId()).toString() + " 0 R"));
            s.write(buf, 0, buf.length);
        } catch (Exception ex123) {
        }
    }

    @Override
    public void getAllReferences(java.util.ArrayList<PdfReference> refs, java.util.ArrayList<Integer> ids) {
        refs.add(this);
    }

    public static PdfReference _new185(int _arg1, int _arg2) {
        PdfReference res = new PdfReference();
        res.setWriteId(_arg1);
        res.id = _arg2;
        return res;
    }

    public static PdfReference _new187(int _arg1) {
        PdfReference res = new PdfReference();
        res.setWriteId(_arg1);
        return res;
    }
    public PdfReference() {
        super();
    }
}
