/** * Creates a new ContentFSTInfo object given be the raw byte data * * @param input * 0x20 byte of data from the FST (starting at 0x20) * @return ContentFSTInfo object */ public static ContentFSTInfo parseContentFST(byte[] input) { if (input == null || input.Length != 0x20) { //MessageBox.Show("Error: invalid ContentFSTInfo byte[] input"); return(null); } ContentFSTInfoParam param = new ContentFSTInfoParam(); ByteBuffer buffer = ByteBuffer.allocate(input.Length); buffer.put(input); buffer.position(0); int offset = buffer.getInt(); int size = buffer.getInt(); long ownerTitleID = buffer.getLong(); int groupID = buffer.getInt(); byte unkown = buffer.get(); param.offsetSector = (offset); param.sizeSector = (size); param.ownerTitleID = (ownerTitleID); param.groupID = (groupID); param.unkown = (unkown); return(new ContentFSTInfo(param)); }
private ContentFSTInfo(ContentFSTInfoParam param) { this.offsetSector = param.offsetSector; this.sizeSector = param.sizeSector; this.ownerTitleID = param.ownerTitleID; this.groupID = param.groupID; this.unkown = param.unkown; }