public UnsignedShortArray(BitStreamReader in, int length) throws IOException {
   if (length == -1) {
     List<Integer> v = new ArrayList<Integer>();
     long __afpos = 0;
     try {
       while (true) {
         __afpos = in.getBitPosition();
         v.add(in.readUnsignedShort());
       }
     } catch (IOException __e) {
       in.setBitPosition(__afpos);
     }
     data = new int[v.size()];
     for (int i = 0; i < data.length; ++i) {
       data[i] = v.get(i).intValue();
     }
   } else {
     this.length = length;
     this.data = new int[length];
     for (int i = 0; i < length; i++) {
       this.data[i] = in.readUnsignedShort();
     }
     this.offset = 0;
   }
 }
 public StringArray(BitStreamReader in, int length) throws IOException {
   if (length == -1) {
     throw new RuntimeException("variable length " + getClass() + " not implemented");
   } else {
     this.length = length;
     data = new String[length];
     for (int i = 0; i < length; i++) {
       data[i] = in.readString();
     }
     this.offset = 0;
   }
 }