avoid stream to array copying

This commit is contained in:
Egor.Ushakov
2017-01-11 13:15:21 +03:00
parent 0255eb3ba5
commit 6a09fe2524
16 changed files with 45 additions and 64 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2017 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
package org.jetbrains.java.decompiler.struct.attr;
import org.jetbrains.java.decompiler.struct.consts.ConstantPool;
import org.jetbrains.java.decompiler.util.DataInputFullStream;
import java.io.IOException;
@@ -24,8 +25,8 @@ public class StructGenericSignatureAttribute extends StructGeneralAttribute {
private String signature;
@Override
public void initContent(ConstantPool pool) throws IOException {
int index = stream().readUnsignedShort();
public void initContent(DataInputFullStream data, ConstantPool pool) throws IOException {
int index = data.readUnsignedShort();
signature = pool.getPrimitiveConstant(index).getString();
}