public synchronized Constant getVal ( int offset , Type type ) { int size ; byte [ ] byteVal = null ; // Check the length of bytes if ( type . isFixedSize ( ) ) { size = type . maxSize ( ) ; } else { byteVal = new byte [ ByteHelper . INT_SIZE ] ; contents . get ( offset , byteVal ) ; size = ByteHelper . toInteger ( byteVal ) ; offset += ByteHelper . INT_SIZE ; } // Get bytes and translate it to Constant byteVal = new byte [ size ] ; contents . get ( offset , byteVal ) ; return Constant . newInstance ( type , byteVal ) ; }
Returns the value at a specified offset of this page . If a constant was not stored at that offset the behavior of the method is unpredictable .