Java Code Examples for com.sun.org.apache.bcel.internal.util.ByteSequence#readByte()

The following examples show how to use com.sun.org.apache.bcel.internal.util.ByteSequence#readByte() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: INVOKEINTERFACE.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Read needed data (i.e., index) from file.
 */
protected void initFromFile(ByteSequence bytes, boolean wide)
     throws IOException
{
  super.initFromFile(bytes, wide);

  length = 5;
  nargs = bytes.readUnsignedByte();
  bytes.readByte(); // Skip 0 byte
}
 
Example 2
Source File: MULTIANEWARRAY.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
/**
 * Read needed data (i.e., no. dimension) from file.
 */
protected void initFromFile(ByteSequence bytes, boolean wide)
     throws IOException
{
  super.initFromFile(bytes, wide);
  dimensions = bytes.readByte();
  length     = 4;
}
 
Example 3
Source File: INVOKEINTERFACE.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Read needed data (i.e., index) from file.
 */
protected void initFromFile(ByteSequence bytes, boolean wide)
     throws IOException
{
  super.initFromFile(bytes, wide);

  length = 5;
  nargs = bytes.readUnsignedByte();
  bytes.readByte(); // Skip 0 byte
}
 
Example 4
Source File: Select.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Read needed data (e.g. index) from file.
 */
@Override
protected void initFromFile(ByteSequence bytes, boolean wide) throws IOException
{
  padding = (4 - (bytes.getIndex() % 4)) % 4; // Compute number of pad bytes

  for(int i=0; i < padding; i++) {
    bytes.readByte();
  }

  // Default branch target common for both cases (TABLESWITCH, LOOKUPSWITCH)
  index = bytes.readInt();
}
 
Example 5
Source File: INVOKEINTERFACE.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Read needed data (i.e., index) from file.
 */
@Override
protected void initFromFile( final ByteSequence bytes, final boolean wide ) throws IOException {
    super.initFromFile(bytes, wide);
    super.setLength(5);
    nargs = bytes.readUnsignedByte();
    bytes.readByte(); // Skip 0 byte
}
 
Example 6
Source File: Select.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Read needed data (e.g. index) from file.
 */
@Override
protected void initFromFile(ByteSequence bytes, boolean wide) throws IOException
{
  padding = (4 - (bytes.getIndex() % 4)) % 4; // Compute number of pad bytes

  for(int i=0; i < padding; i++) {
    bytes.readByte();
  }

  // Default branch target common for both cases (TABLESWITCH, LOOKUPSWITCH)
  index = bytes.readInt();
}
 
Example 7
Source File: INVOKEINTERFACE.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Read needed data (i.e., index) from file.
 */
protected void initFromFile(ByteSequence bytes, boolean wide)
     throws IOException
{
  super.initFromFile(bytes, wide);

  length = 5;
  nargs = bytes.readUnsignedByte();
  bytes.readByte(); // Skip 0 byte
}
 
Example 8
Source File: INVOKEINTERFACE.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Read needed data (i.e., index) from file.
 */
protected void initFromFile(ByteSequence bytes, boolean wide)
     throws IOException
{
  super.initFromFile(bytes, wide);

  length = 5;
  nargs = bytes.readUnsignedByte();
  bytes.readByte(); // Skip 0 byte
}
 
Example 9
Source File: INVOKEINTERFACE.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Read needed data (i.e., index) from file.
 */
protected void initFromFile(ByteSequence bytes, boolean wide)
     throws IOException
{
  super.initFromFile(bytes, wide);

  length = 5;
  nargs = bytes.readUnsignedByte();
  bytes.readByte(); // Skip 0 byte
}
 
Example 10
Source File: IINC.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Read needed data (e.g. index) from file.
 */
protected void initFromFile(ByteSequence bytes, boolean wide) throws IOException
{
  this.wide = wide;

  if(wide) {
    length = 6;
    n = bytes.readUnsignedShort();
    c = bytes.readShort();
  } else {
    length = 3;
    n = bytes.readUnsignedByte();
    c = bytes.readByte();
  }
}
 
Example 11
Source File: INVOKEINTERFACE.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Read needed data (i.e., index) from file.
 */
protected void initFromFile(ByteSequence bytes, boolean wide)
     throws IOException
{
  super.initFromFile(bytes, wide);

  length = 5;
  nargs = bytes.readUnsignedByte();
  bytes.readByte(); // Skip 0 byte
}
 
Example 12
Source File: Select.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Read needed data (e.g. index) from file.
 */
@Override
protected void initFromFile(ByteSequence bytes, boolean wide) throws IOException
{
  padding = (4 - (bytes.getIndex() % 4)) % 4; // Compute number of pad bytes

  for(int i=0; i < padding; i++) {
    bytes.readByte();
  }

  // Default branch target common for both cases (TABLESWITCH, LOOKUPSWITCH)
  index = bytes.readInt();
}
 
Example 13
Source File: MULTIANEWARRAY.java    From JDKSourceCode1.8 with MIT License 5 votes vote down vote up
/**
 * Read needed data (i.e., no. dimension) from file.
 */
protected void initFromFile(ByteSequence bytes, boolean wide)
     throws IOException
{
  super.initFromFile(bytes, wide);
  dimensions = bytes.readByte();
  length     = 4;
}
 
Example 14
Source File: MULTIANEWARRAY.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Read needed data (i.e., no. dimension) from file.
 */
protected void initFromFile(ByteSequence bytes, boolean wide)
     throws IOException
{
  super.initFromFile(bytes, wide);
  dimensions = bytes.readByte();
  length     = 4;
}
 
Example 15
Source File: IINC.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Read needed data (e.g. index) from file.
 */
protected void initFromFile(ByteSequence bytes, boolean wide) throws IOException
{
  this.wide = wide;

  if(wide) {
    length = 6;
    n = bytes.readUnsignedShort();
    c = bytes.readShort();
  } else {
    length = 3;
    n = bytes.readUnsignedByte();
    c = bytes.readByte();
  }
}
 
Example 16
Source File: NEWARRAY.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Read needed data (e.g. index) from file.
 */
protected void initFromFile(ByteSequence bytes, boolean wide) throws IOException
{
  type   = bytes.readByte();
  length = 2;
}
 
Example 17
Source File: BIPUSH.java    From JDKSourceCode1.8 with MIT License 4 votes vote down vote up
/**
 * Read needed data (e.g. index) from file.
 */
protected void initFromFile(ByteSequence bytes, boolean wide) throws IOException
{
  length = 2;
  b      = bytes.readByte();
}
 
Example 18
Source File: NEWARRAY.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Read needed data (e.g. index) from file.
 */
protected void initFromFile(ByteSequence bytes, boolean wide) throws IOException
{
  type   = bytes.readByte();
  length = 2;
}
 
Example 19
Source File: BIPUSH.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Read needed data (e.g. index) from file.
 */
protected void initFromFile(ByteSequence bytes, boolean wide) throws IOException
{
  length = 2;
  b      = bytes.readByte();
}
 
Example 20
Source File: BIPUSH.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Read needed data (e.g. index) from file.
 */
protected void initFromFile(ByteSequence bytes, boolean wide) throws IOException
{
  length = 2;
  b      = bytes.readByte();
}