Ejemplo n.º 1
0
 /**
  *
  *
  * <ul>
  *   Structure of stream : Data[size]
  *   <li>idAction [1]
  *   <li>new controller [TestOn]
  *   <li>destination zone [IdZone]
  *   <li>idPosition [int16]
  *   <li>silent [boolean]
  * </ul>
  *
  * @param node the XML action structure
  * @param out output stream where the card structure will be saved.
  * @return the amount of written action in the output.
  * @throws IOException
  */
 public final int buildMdb(XmlParser.Node node, OutputStream out) throws IOException {
   XmlAction.buildMdb(Actiontype.MOVE_CARD, node, out);
   TestOn.serialize(out, node.getAttribute("controller"));
   out.write(XmlTools.getZone(node.getAttribute("destination")));
   MToolKit.writeInt16(out, XmlTools.getPosition(node.getAttribute("position")));
   out.write("true".equals(node.getAttribute("silent")) ? 1 : 0);
   return 1;
 }
Ejemplo n.º 2
0
 /**
  * Creates a new instance of CardTypes <br>
  *
  * <ul>
  *   Structure of InputStream : Data[size]
  *   <li>idTestOn [1]
  * </ul>
  *
  * @param inputFile file containing this action
  * @throws IOException if error occurred during the reading process from the specified input
  *     stream
  */
 public CardTypes(InputStream inputFile) throws IOException {
   super();
   on = TestOn.deserialize(inputFile);
 }