Пример #1
0
 /**
  * Main method, launching the standalone mode. Command-line arguments are listed with the {@code
  * -h} argument.
  *
  * @param args command-line arguments
  */
 public static void main(final String... args) {
   try {
     new BaseX(args);
   } catch (final IOException ex) {
     Util.errln(ex);
     System.exit(1);
   }
 }
Пример #2
0
 /**
  * Sets the output text.
  *
  * @param out cached output
  */
 public void setText(final ArrayOutput out) {
   final byte[] buf = out.buffer();
   final int size = (int) out.size();
   final byte[] chop = token(DOTS);
   if (out.finished() && size >= chop.length) {
     System.arraycopy(chop, 0, buf, size - chop.length, chop.length);
   }
   text.setText(buf, size);
   header.setText((out.finished() ? CHOPPED : "") + RESULT);
   home.setEnabled(gui.context.data() != null);
 }