Class ByteBuffer

java.lang.Object
com.aparapi.internal.reader.ByteBuffer

public class ByteBuffer extends Object
Used to parse ClassFile structure.
Provides low level access to sequential bytes in a stream given a specific offset. Does not keep track of accesses. For this you will need a ByteReader
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private byte[]
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ByteBuffer(byte[] _bytes)
     
    ByteBuffer(InputStream _inputStream)
    Construct from an InputStream
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) byte
    b(int _offset)
     
    (package private) byte[]
    bytes(int _offset, int _length)
     
    (package private) double
    d8(int _offset)
     
    (package private) float
    f4(int _offset)
     
    (package private) int
    s2(int _offset)
     
    (package private) int
    s4(int _offset)
     
    (package private) int
     
    (package private) int
    u1(int _offset)
     
    (package private) int
    u2(int _offset)
     
    (package private) int
    u4(int _offset)
     
    (package private) long
    u8(int _offset)
     
    (package private) String
    utf8(int _offset)
     
    (package private) int
    utf8bytes(int _offset)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • bytes

      private byte[] bytes
  • Constructor Details

    • ByteBuffer

      ByteBuffer(InputStream _inputStream)
      Construct from an InputStream
      Parameters:
      _inputStream -
    • ByteBuffer

      ByteBuffer(byte[] _bytes)
  • Method Details

    • u2

      int u2(int _offset)
    • s2

      int s2(int _offset)
    • u4

      int u4(int _offset)
    • s4

      int s4(int _offset)
    • u1

      int u1(int _offset)
    • size

      int size()
    • d8

      double d8(int _offset)
    • f4

      float f4(int _offset)
    • u8

      long u8(int _offset)
    • utf8bytes

      int utf8bytes(int _offset)
    • bytes

      byte[] bytes(int _offset, int _length)
    • utf8

      String utf8(int _offset)
    • b

      byte b(int _offset)