/** Creates a <code>Box</code> object with the provided <code>type</code> * based on the provided Node object based on reflection. */ public static Box createBox(int type, Node node) throws IIOInvalidTreeException { Class boxClass = (Class)boxClasses.get(new Integer(type)); try { // gets the constructor with <code>Node</code parameter Constructor cons = boxClass.getConstructor(new Class[] {Node.class}); if (cons != null) { return (Box)cons.newInstance(new Object[]{node}); } } catch(NoSuchMethodException e) { // If exception throws, create a <code>Box</code> instance. e.printStackTrace(); return new Box(node); } catch(InvocationTargetException e) { e.printStackTrace(); return new Box(node); } catch (IllegalAccessException e) { e.printStackTrace(); return new Box(node); } catch (InstantiationException e) { e.printStackTrace(); return new Box(node); } return null; }
/** Creates a <code>Box</code> object with the provided <code>type</code> * based on the provided Node object based on reflection. */ public static Box createBox(int type, Node node) throws IIOInvalidTreeException { Class boxClass = (Class)boxClasses.get(new Integer(type)); try { // gets the constructor with <code>Node</code parameter Constructor cons = boxClass.getConstructor(new Class[] {Node.class}); if (cons != null) { return (Box)cons.newInstance(new Object[]{node}); } } catch(NoSuchMethodException e) { // If exception throws, create a <code>Box</code> instance. e.printStackTrace(); return new Box(node); } catch(InvocationTargetException e) { e.printStackTrace(); return new Box(node); } catch (IllegalAccessException e) { e.printStackTrace(); return new Box(node); } catch (InstantiationException e) { e.printStackTrace(); return new Box(node); } return null; }
/** Creates a <code>Box</code> object with the provided <code>type</code> * based on the provided Node object based on reflection. */ public static Box createBox(int type, Node node) throws IIOInvalidTreeException { Class boxClass = (Class)boxClasses.get(new Integer(type)); try { // gets the constructor with <code>Node</code parameter Constructor cons = boxClass.getConstructor(new Class[] {Node.class}); if (cons != null) { return (Box)cons.newInstance(new Object[]{node}); } } catch(NoSuchMethodException e) { // If exception throws, create a <code>Box</code> instance. e.printStackTrace(); return new Box(node); } catch(InvocationTargetException e) { e.printStackTrace(); return new Box(node); } catch (IllegalAccessException e) { e.printStackTrace(); return new Box(node); } catch (InstantiationException e) { e.printStackTrace(); return new Box(node); } return null; }
/** * This method reads the contents of the Intellectual property box * */ public void readIntPropertyBox(int length) throws IOException { if (metadata != null) { byte[] data = new byte[length]; in.readFully(data, 0, length); metadata.addNode(new Box(length + 8, 0x6A703269, data)); } }
/** * This method reads the contents of the Intellectual property box * */ public void readIntPropertyBox(int length) throws IOException { if (metadata != null) { byte[] data = new byte[length]; in.readFully(data, 0, length); metadata.addNode(new Box(length + 8, 0x6A703269, data)); } }
/** * This method reads the contents of the Intellectual property box * */ public void readIntPropertyBox(int length) throws IOException { if (metadata != null) { byte[] data = new byte[length]; in.readFully(data, 0, length); metadata.addNode(new Box(length + 8, 0x6A703269, data)); } }
byte[] data = new byte[length]; in.readFully(data, 0, length); metadata.addNode(new Box(length + 8, box, longLength,
byte[] data = new byte[length]; in.readFully(data, 0, length); metadata.addNode(new Box(length + 8, box, longLength,
byte[] data = new byte[length]; in.readFully(data, 0, length); metadata.addNode(new Box(length + 8, box, longLength,