alexandroid/decompiled/jadx/sources/org/codehaus/jackson/io/BaseReader.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

67 lines
2.3 KiB
Java

package org.codehaus.jackson.io;
import androidx.biometric.ErrorUtils$$ExternalSyntheticOutline0;
import com.amazon.alexa.ra.core.ui.markdown.parser.formatter.MarkdownConstants;
import defpackage.a$$ExternalSyntheticOutline0;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes11.dex */
abstract class BaseReader extends Reader {
protected static final int LAST_VALID_UNICODE_CHAR = 1114111;
protected static final char NULL_BYTE = 0;
protected static final char NULL_CHAR = 0;
protected byte[] _buffer;
protected final IOContext _context;
protected InputStream _in;
protected int _length;
protected int _ptr;
protected char[] _tmpBuf = null;
public BaseReader(IOContext iOContext, InputStream inputStream, byte[] bArr, int i, int i2) {
this._context = iOContext;
this._in = inputStream;
this._buffer = bArr;
this._ptr = i;
this._length = i2;
}
@Override // java.io.Reader, java.io.Closeable, java.lang.AutoCloseable
public void close() throws IOException {
InputStream inputStream = this._in;
if (inputStream != null) {
this._in = null;
freeBuffers();
inputStream.close();
}
}
public final void freeBuffers() {
byte[] bArr = this._buffer;
if (bArr != null) {
this._buffer = null;
this._context.releaseReadIOBuffer(bArr);
}
}
@Override // java.io.Reader
public int read() throws IOException {
if (this._tmpBuf == null) {
this._tmpBuf = new char[1];
}
if (read(this._tmpBuf, 0, 1) < 1) {
return -1;
}
return this._tmpBuf[0];
}
public void reportBounds(char[] cArr, int i, int i2) throws IOException {
throw new ArrayIndexOutOfBoundsException(a$$ExternalSyntheticOutline0.m(ErrorUtils$$ExternalSyntheticOutline0.m29m(i, i2, "read(buf,", ",", "), cbuf["), cArr.length, MarkdownConstants.RIGHT_BRACKET));
}
public void reportStrangeStream() throws IOException {
throw new IOException("Strange I/O stream, returned 0 bytes on read");
}
}