Komplettes G-Earth Paket inkl. JRE, Extensions und Tools. Extensions: - G-BuildTools, G-Click Ultimate, G-Loader, G-Manipulate - G-Presets, G-Translator, G-Trigger, G-itemViewer - Market Utils, Packet Info Explorer, Plants - RandomRoomVisitor, RoomLogger, Sanbovir Photo Inspector - SpyFriends, WallAligner, XabboScripter, xabbo
106 lines
3.9 KiB
Java
106 lines
3.9 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package okio;
|
|
|
|
import java.io.IOException;
|
|
import java.util.zip.Inflater;
|
|
import okio.Buffer;
|
|
import okio.BufferedSource;
|
|
import okio.Okio;
|
|
import okio.Segment;
|
|
import okio.Source;
|
|
import okio.Timeout;
|
|
|
|
public final class InflaterSource
|
|
implements Source {
|
|
private final BufferedSource source;
|
|
private final Inflater inflater;
|
|
private int bufferBytesHeldByInflater;
|
|
private boolean closed;
|
|
|
|
public InflaterSource(Source source, Inflater inflater) {
|
|
this(Okio.buffer(source), inflater);
|
|
}
|
|
|
|
InflaterSource(BufferedSource source, Inflater inflater) {
|
|
if (source == null) {
|
|
throw new IllegalArgumentException("source == null");
|
|
}
|
|
if (inflater == null) {
|
|
throw new IllegalArgumentException("inflater == null");
|
|
}
|
|
this.source = source;
|
|
this.inflater = inflater;
|
|
}
|
|
|
|
/*
|
|
* Exception decompiling
|
|
*/
|
|
@Override
|
|
public long read(Buffer sink, long byteCount) throws IOException {
|
|
/*
|
|
* This method has failed to decompile. When submitting a bug report, please provide this stack trace, and (if you hold appropriate legal rights) the relevant class file.
|
|
*
|
|
* org.benf.cfr.reader.util.ConfusedCFRException: Tried to end blocks [2[DOLOOP]], but top level block is 0[TRYBLOCK]
|
|
* at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.processEndingBlocks(Op04StructuredStatement.java:435)
|
|
* at org.benf.cfr.reader.bytecode.analysis.opgraph.Op04StructuredStatement.buildNestedBlocks(Op04StructuredStatement.java:484)
|
|
* at org.benf.cfr.reader.bytecode.analysis.opgraph.Op03SimpleStatement.createInitialStructuredBlock(Op03SimpleStatement.java:736)
|
|
* at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisInner(CodeAnalyser.java:850)
|
|
* at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysisOrWrapFail(CodeAnalyser.java:278)
|
|
* at org.benf.cfr.reader.bytecode.CodeAnalyser.getAnalysis(CodeAnalyser.java:201)
|
|
* at org.benf.cfr.reader.entities.attributes.AttributeCode.analyse(AttributeCode.java:94)
|
|
* at org.benf.cfr.reader.entities.Method.analyse(Method.java:531)
|
|
* at org.benf.cfr.reader.entities.ClassFile.analyseMid(ClassFile.java:1055)
|
|
* at org.benf.cfr.reader.entities.ClassFile.analyseTop(ClassFile.java:942)
|
|
* at org.benf.cfr.reader.Driver.doJarVersionTypes(Driver.java:257)
|
|
* at org.benf.cfr.reader.Driver.doJar(Driver.java:139)
|
|
* at org.benf.cfr.reader.CfrDriverImpl.analyse(CfrDriverImpl.java:76)
|
|
* at org.benf.cfr.reader.Main.main(Main.java:54)
|
|
*/
|
|
throw new IllegalStateException("Decompilation failed");
|
|
}
|
|
|
|
public boolean refill() throws IOException {
|
|
if (!this.inflater.needsInput()) {
|
|
return false;
|
|
}
|
|
this.releaseInflatedBytes();
|
|
if (this.inflater.getRemaining() != 0) {
|
|
throw new IllegalStateException("?");
|
|
}
|
|
if (this.source.exhausted()) {
|
|
return true;
|
|
}
|
|
Segment head = this.source.buffer().head;
|
|
this.bufferBytesHeldByInflater = head.limit - head.pos;
|
|
this.inflater.setInput(head.data, head.pos, this.bufferBytesHeldByInflater);
|
|
return false;
|
|
}
|
|
|
|
private void releaseInflatedBytes() throws IOException {
|
|
if (this.bufferBytesHeldByInflater == 0) {
|
|
return;
|
|
}
|
|
int toRelease = this.bufferBytesHeldByInflater - this.inflater.getRemaining();
|
|
this.bufferBytesHeldByInflater -= toRelease;
|
|
this.source.skip(toRelease);
|
|
}
|
|
|
|
@Override
|
|
public Timeout timeout() {
|
|
return this.source.timeout();
|
|
}
|
|
|
|
@Override
|
|
public void close() throws IOException {
|
|
if (this.closed) {
|
|
return;
|
|
}
|
|
this.inflater.end();
|
|
this.closed = true;
|
|
this.source.close();
|
|
}
|
|
}
|
|
|