1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00
This commit is contained in:
gnosygnu
2015-05-03 22:30:22 -04:00
parent f4b95f5ce6
commit 0b5aa9aefe
207 changed files with 2339 additions and 1460 deletions

View File

@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa; import gplx.*;
public class Xof_meta_thumb_parser extends Obj_ary_parser_base {
NumberParser num_parser = new NumberParser();
Number_parser num_parser = new Number_parser();
Int_ary_parser int_ary_parser = new Int_ary_parser();
public Xof_meta_thumb[] Ary() {return ary;} private Xof_meta_thumb[] ary = new Xof_meta_thumb[Ary_max]; static final int Ary_max = 16;
public int Len() {return ary_idx;} private int ary_idx;
@@ -49,11 +49,11 @@ public class Xof_meta_thumb_parser extends Obj_ary_parser_base {
byte b = bry[pos];
switch (b) {
case Dlm_width: // "," found; assume width; note that seek commas will be handled by seek
itm.Width_(num_parser.Parse(bry, num_bgn, pos).AsInt());
itm.Width_(num_parser.Parse(bry, num_bgn, pos).Rv_as_int());
num_bgn = pos + Int_.Const_dlm_len;
break;
case Dlm_seek:
itm.Height_(num_parser.Parse(bry, num_bgn, pos).AsInt());
itm.Height_(num_parser.Parse(bry, num_bgn, pos).Rv_as_int());
num_bgn = pos + Int_.Const_dlm_len;
height_found = true;
itm.Seeks_(int_ary_parser.Parse_ary(bry, num_bgn, end, Byte_ascii.Comma));
@@ -63,7 +63,7 @@ public class Xof_meta_thumb_parser extends Obj_ary_parser_base {
++pos;
}
if (!height_found) // handle '1:2,3' as opposed to '1:2,3@4'
itm.Height_(num_parser.Parse(bry, num_bgn, end).AsInt());
itm.Height_(num_parser.Parse(bry, num_bgn, end).Rv_as_int());
ary[ary_idx++] = itm;
}
static final String GRP_KEY = "xowa.meta.itm.file";