/** Load a lua strin gvalue from the input stream * @return the {@link LuaString} value laoded. **/ LuaString loadString() throws IOException { int size = this.luacSizeofSizeT == 8? (int) loadInt64(): loadInt(); if ( size == 0 ) return null; byte[] bytes = new byte[size]; is.readFully( bytes, 0, size ); return LuaString.valueUsing( bytes, 0, bytes.length - 1 ); }
/** Load a lua strin gvalue from the input stream * @return the {@link LuaString} value laoded. **/ LuaString loadString() throws IOException { int size = this.luacSizeofSizeT == 8? (int) loadInt64(): loadInt(); if ( size == 0 ) return null; byte[] bytes = new byte[size]; is.readFully( bytes, 0, size ); return LuaString.valueUsing( bytes, 0, bytes.length - 1 ); }
/** * Load a number from a binary chunk * @return the {@link LuaValue} loaded * @throws IOException if an i/o exception occurs */ LuaValue loadNumber() throws IOException { if ( luacNumberFormat == NUMBER_FORMAT_INTS_ONLY ) { return LuaInteger.valueOf( loadInt() ); } else { return longBitsToLuaNumber( loadInt64() ); } }
/** * Load a number from a binary chunk * @return the {@link LuaValue} loaded * @throws IOException if an i/o exception occurs */ LuaValue loadNumber() throws IOException { if ( luacNumberFormat == NUMBER_FORMAT_INTS_ONLY ) { return LuaInteger.valueOf( loadInt() ); } else { return longBitsToLuaNumber( loadInt64() ); } }