Ejemplo n.º 1
0
public virtual global::System.Object decode(global::java.nio.ByteBuffer n1, global::java.nio.CharBuffer n2, bool n3){
//XMLVM_BEGIN_WRAPPER[java.nio.charset.CharsetDecoder: java.nio.charset.CoderResult decode(java.nio.ByteBuffer, java.nio.CharBuffer, boolean)]
    global::org.xmlvm._nElement _r0;
    global::System.Object _r0_o = null;
    global::org.xmlvm._nElement _r1;
    global::System.Object _r1_o = null;
    global::org.xmlvm._nElement _r2;
    global::System.Object _r2_o = null;
    global::org.xmlvm._nElement _r3;
    global::System.Object _r4_o = null;
    global::System.Object _r5_o = null;
    global::System.Object _r6_o = null;
    global::org.xmlvm._nElement _r7;
    global::org.xmlvm._nExceptionAdapter _ex = null;
    _r4_o = this;
    _r5_o = n1;
    _r6_o = n2;
    _r7.i = n3 ? 1 : 0;
    _r3.i = 2;
    _r0.i = ((global::java.nio.charset.CharsetDecoder) _r4_o)._fstatus;
    _r1.i = 3;
    if (_r0.i == _r1.i) goto label12;
    if (_r7.i != 0) goto label35;
    _r0.i = ((global::java.nio.charset.CharsetDecoder) _r4_o)._fstatus;
    if (_r0.i != _r3.i) goto label35;
    label12:;
    _r0_o = new global::java.lang.IllegalStateException();
    ((global::java.lang.IllegalStateException) _r0_o).@this();
    throw new global::org.xmlvm._nExceptionAdapter((global::java.lang.IllegalStateException) _r0_o);
    label18:;
    _r1_o = ((global::java.nio.charset.CharsetDecoder) _r4_o)._freplace;
    ((global::java.nio.CharBuffer) _r6_o).put((global::java.lang.String) _r1_o);
    label23:;
    _r1.i = ((global::java.nio.ByteBuffer) _r5_o).position();
    _r0.i = ((global::java.nio.charset.CoderResult) _r0_o).length();
    _r0.i = _r0.i + _r1.i;
    ((global::java.nio.ByteBuffer) _r5_o).position((int) _r0.i);
    label35:;
    try {
    _r0_o = ((global::java.nio.charset.CharsetDecoder) _r4_o).decodeLoop((global::java.nio.ByteBuffer) _r5_o, (global::java.nio.CharBuffer) _r6_o);
    }
    catch (global::System.Exception e) {
 global::org.xmlvm._nExceptionAdapter ex = e as global::org.xmlvm._nExceptionAdapter ?? new global::org.xmlvm._nExceptionAdapter(e.ToString(), e.ToJavaException());
        global::System.Object _java_exception = ex.getJavaException();
        if (_java_exception is global::java.nio.BufferOverflowException) {
            _ex = ex;
            goto label69;
        }
        if (_java_exception is global::java.nio.BufferUnderflowException) {
            _ex = ex;
            goto label76;
        }
        throw ex;
    } // end catch
    _r1.i = ((global::java.nio.charset.CoderResult) _r0_o).isUnderflow() ? 1 : 0;
    if (_r1.i == 0) goto label62;
    _r1.i = ((global::java.nio.ByteBuffer) _r5_o).remaining();
    if (_r7.i == 0) goto label83;
    _r2.i = _r3.i;
    label52:;
    ((global::java.nio.charset.CharsetDecoder) _r4_o)._fstatus = _r2.i;
    if (_r7.i == 0) goto label68;
    if (_r1.i <= 0) goto label68;
    _r0_o = global::java.nio.charset.CoderResult.malformedForLength((int) _r1.i);
    label62:;
    _r1.i = ((global::java.nio.charset.CoderResult) _r0_o).isOverflow() ? 1 : 0;
    if (_r1.i == 0) goto label85;
    label68:;
    return (global::java.nio.charset.CoderResult) _r0_o;
    label69:;
    _r0_o = _ex.getJavaException();
    _ex = null;
    _r1_o = new global::java.nio.charset.CoderMalfunctionError();
    ((global::java.nio.charset.CoderMalfunctionError) _r1_o).@this((global::java.lang.Exception) _r0_o);
    throw new global::org.xmlvm._nExceptionAdapter((global::java.nio.charset.CoderMalfunctionError) _r1_o);
    label76:;
    _r0_o = _ex.getJavaException();
    _ex = null;
    _r1_o = new global::java.nio.charset.CoderMalfunctionError();
    ((global::java.nio.charset.CoderMalfunctionError) _r1_o).@this((global::java.lang.Exception) _r0_o);
    throw new global::org.xmlvm._nExceptionAdapter((global::java.nio.charset.CoderMalfunctionError) _r1_o);
    label83:;
    _r2.i = 1;
    goto label52;
    label85:;
    _r1_o = ((global::java.nio.charset.CharsetDecoder) _r4_o)._fmalformAction;
    _r2.i = ((global::java.nio.charset.CoderResult) _r0_o).isUnmappable() ? 1 : 0;
    if (_r2.i == 0) goto label95;
    _r1_o = ((global::java.nio.charset.CharsetDecoder) _r4_o)._funmapAction;
    label95:;
    _r2_o = global::java.nio.charset.CodingErrorAction._fREPLACE;
    if (_r1_o != _r2_o) goto label114;
    _r1.i = ((global::java.nio.CharBuffer) _r6_o).remaining();
    _r2_o = ((global::java.nio.charset.CharsetDecoder) _r4_o)._freplace;
    _r2.i = ((global::java.lang.String) _r2_o).length();
    if (_r1.i >= _r2.i) goto label18;
    _r0_o = global::java.nio.charset.CoderResult._fOVERFLOW;
    goto label68;
    label114:;
    _r2_o = global::java.nio.charset.CodingErrorAction._fIGNORE;
    if (_r1_o == _r2_o) goto label23;
    goto label68;
//XMLVM_END_WRAPPER[java.nio.charset.CharsetDecoder: java.nio.charset.CoderResult decode(java.nio.ByteBuffer, java.nio.CharBuffer, boolean)]
}
Ejemplo n.º 2
0
public virtual global::System.Object encode(global::java.nio.CharBuffer n1, global::java.nio.ByteBuffer n2, bool n3){
//XMLVM_BEGIN_WRAPPER[java.nio.charset.CharsetEncoder: java.nio.charset.CoderResult encode(java.nio.CharBuffer, java.nio.ByteBuffer, boolean)]
    global::org.xmlvm._nElement _r0;
    global::System.Object _r0_o = null;
    global::org.xmlvm._nElement _r1;
    global::System.Object _r1_o = null;
    global::org.xmlvm._nElement _r2;
    global::System.Object _r2_o = null;
    global::org.xmlvm._nElement _r3;
    global::org.xmlvm._nElement _r4;
    global::System.Object _r5_o = null;
    global::System.Object _r6_o = null;
    global::System.Object _r7_o = null;
    global::org.xmlvm._nElement _r8;
    global::org.xmlvm._nExceptionAdapter _ex = null;
    _r5_o = this;
    _r6_o = n1;
    _r7_o = n2;
    _r8.i = n3 ? 1 : 0;
    _r4.i = 1;
    _r3.i = 2;
    _r0.i = ((global::java.nio.charset.CharsetEncoder) _r5_o)._fstatus;
    if (_r0.i != 0) goto label18;
    _r0.i = ((global::java.nio.charset.CharsetEncoder) _r5_o)._ffinished ? 1 : 0;
    if (_r0.i == 0) goto label18;
    if (_r8.i != 0) goto label18;
    _r0_o = new global::java.lang.IllegalStateException();
    ((global::java.lang.IllegalStateException) _r0_o).@this();
    throw new global::org.xmlvm._nExceptionAdapter((global::java.lang.IllegalStateException) _r0_o);
    label18:;
    _r0.i = ((global::java.nio.charset.CharsetEncoder) _r5_o)._fstatus;
    _r1.i = 3;
    if (_r0.i == _r1.i) goto label29;
    if (_r8.i != 0) goto label52;
    _r0.i = ((global::java.nio.charset.CharsetEncoder) _r5_o)._fstatus;
    if (_r0.i != _r3.i) goto label52;
    label29:;
    _r0_o = new global::java.lang.IllegalStateException();
    ((global::java.lang.IllegalStateException) _r0_o).@this();
    throw new global::org.xmlvm._nExceptionAdapter((global::java.lang.IllegalStateException) _r0_o);
    label35:;
    _r1_o = ((global::java.nio.charset.CharsetEncoder) _r5_o)._freplace;
    ((global::java.nio.ByteBuffer) _r7_o).put((global::org.xmlvm._nArrayAdapter<sbyte>) _r1_o);
    label40:;
    _r1.i = ((global::java.nio.CharBuffer) _r6_o).position();
    _r0.i = ((global::java.nio.charset.CoderResult) _r0_o).length();
    _r0.i = _r0.i + _r1.i;
    ((global::java.nio.CharBuffer) _r6_o).position((int) _r0.i);
    label52:;
    try {
    _r0_o = ((global::java.nio.charset.CharsetEncoder) _r5_o).encodeLoop((global::java.nio.CharBuffer) _r6_o, (global::java.nio.ByteBuffer) _r7_o);
    }
    catch (global::System.Exception e) {
 global::org.xmlvm._nExceptionAdapter ex = e as global::org.xmlvm._nExceptionAdapter ?? new global::org.xmlvm._nExceptionAdapter(e.ToString(), e.ToJavaException());
        global::System.Object _java_exception = ex.getJavaException();
        if (_java_exception is global::java.nio.BufferOverflowException) {
            _ex = ex;
            goto label103;
        }
        if (_java_exception is global::java.nio.BufferUnderflowException) {
            _ex = ex;
            goto label110;
        }
        throw ex;
    } // end catch
    _r1_o = global::java.nio.charset.CoderResult._fUNDERFLOW;
    if (_r0_o != _r1_o) goto label119;
    if (_r8.i == 0) goto label117;
    _r1.i = _r3.i;
    label63:;
    ((global::java.nio.charset.CharsetEncoder) _r5_o)._fstatus = _r1.i;
    if (_r8.i == 0) goto label102;
    _r1.i = ((global::java.nio.CharBuffer) _r6_o).remaining();
    if (_r1.i <= 0) goto label102;
    _r0_o = global::java.nio.charset.CoderResult.malformedForLength((int) _r1.i);
    label77:;
    _r1_o = ((global::java.nio.charset.CharsetEncoder) _r5_o)._fmalformAction;
    _r2.i = ((global::java.nio.charset.CoderResult) _r0_o).isUnmappable() ? 1 : 0;
    if (_r2.i == 0) goto label87;
    _r1_o = ((global::java.nio.charset.CharsetEncoder) _r5_o)._funmapAction;
    label87:;
    _r2_o = global::java.nio.charset.CodingErrorAction._fREPLACE;
    if (_r1_o != _r2_o) goto label131;
    _r1.i = ((global::java.nio.ByteBuffer) _r7_o).remaining();
    _r2_o = ((global::java.nio.charset.CharsetEncoder) _r5_o)._freplace;
    _r2.i = ((global::org.xmlvm._nIArray) _r2_o).Length;
    if (_r1.i >= _r2.i) goto label35;
    _r0_o = global::java.nio.charset.CoderResult._fOVERFLOW;
    label102:;
    return (global::java.nio.charset.CoderResult) _r0_o;
    label103:;
    _r0_o = _ex.getJavaException();
    _ex = null;
    _r1_o = new global::java.nio.charset.CoderMalfunctionError();
    ((global::java.nio.charset.CoderMalfunctionError) _r1_o).@this((global::java.lang.Exception) _r0_o);
    throw new global::org.xmlvm._nExceptionAdapter((global::java.nio.charset.CoderMalfunctionError) _r1_o);
    label110:;
    _r0_o = _ex.getJavaException();
    _ex = null;
    _r1_o = new global::java.nio.charset.CoderMalfunctionError();
    ((global::java.nio.charset.CoderMalfunctionError) _r1_o).@this((global::java.lang.Exception) _r0_o);
    throw new global::org.xmlvm._nExceptionAdapter((global::java.nio.charset.CoderMalfunctionError) _r1_o);
    label117:;
    _r1.i = _r4.i;
    goto label63;
    label119:;
    _r1_o = global::java.nio.charset.CoderResult._fOVERFLOW;
    if (_r0_o != _r1_o) goto label77;
    if (_r8.i == 0) goto label129;
    _r1.i = _r3.i;
    label126:;
    ((global::java.nio.charset.CharsetEncoder) _r5_o)._fstatus = _r1.i;
    goto label102;
    label129:;
    _r1.i = _r4.i;
    goto label126;
    label131:;
    _r2_o = global::java.nio.charset.CodingErrorAction._fIGNORE;
    if (_r1_o == _r2_o) goto label40;
    goto label102;
//XMLVM_END_WRAPPER[java.nio.charset.CharsetEncoder: java.nio.charset.CoderResult encode(java.nio.CharBuffer, java.nio.ByteBuffer, boolean)]
}