you actually don't need to define the offset, can jsut do buf.getFloat(), buf.getFlot(), buf.getInt()... Same for puts.