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-08-03 00:10:03 -04:00
parent 9d63f03b3d
commit 34c34f227c
514 changed files with 4972 additions and 3910 deletions

View File

@@ -50,7 +50,7 @@ public class Xof_ext_ {
};
private static final Hash_adp id_hash = id_hash_new_();
private static Hash_adp id_hash_new_() {
Hash_adp rv = Hash_adp_bry.cs_();
Hash_adp rv = Hash_adp_bry.cs();
id_hash_new_(rv, Bry_png, Id_png); id_hash_new_(rv, Bry_jpg, Id_jpg); id_hash_new_(rv, Bry_jpeg, Id_jpeg);
id_hash_new_(rv, Bry_gif, Id_gif); id_hash_new_(rv, Bry_tif, Id_tif); id_hash_new_(rv, Bry_tiff, Id_tiff);
id_hash_new_(rv, Bry_svg, Id_svg); id_hash_new_(rv, Bry_djvu, Id_djvu); id_hash_new_(rv, Bry_pdf, Id_pdf);
@@ -61,7 +61,7 @@ public class Xof_ext_ {
}
private static void id_hash_new_(Hash_adp hash, byte[] key, int val) {hash.Add(key, Int_obj_val.new_(val));}
private static final Hash_adp_bry ext_hash = Hash_adp_bry.ci_ascii_()
private static final Hash_adp_bry ext_hash = Hash_adp_bry.ci_a7()
.Add_bry_bry(Bry_png).Add_bry_bry(Bry_jpg).Add_bry_bry(Bry_jpeg)
.Add_bry_bry(Bry_gif).Add_bry_bry(Bry_tif).Add_bry_bry(Bry_tiff)
.Add_bry_bry(Bry_svg).Add_bry_bry(Bry_djvu).Add_bry_bry(Bry_pdf)
@@ -82,7 +82,7 @@ public class Xof_ext_ {
public static Xof_ext new_by_ttl_(byte[] ttl) {
int ttl_len = ttl.length;
int dot_pos = Bry_finder.Find_bwd(ttl, Byte_ascii.Dot);
byte[] ext = (dot_pos == Bry_.NotFound || dot_pos == ttl_len) ? Bry_.Empty : Bry_.Xto_str_lower(ttl, dot_pos + 1, ttl_len); // +1 to bgn after .
byte[] ext = (dot_pos == Bry_.NotFound || dot_pos == ttl_len) ? Bry_.Empty : Bry_.Lcase__all(ttl, dot_pos + 1, ttl_len); // +1 to bgn after .
return new_(Get_id_by_ext_(ext), ext);
}
public static Xof_ext new_by_ext_(byte[] ext) {return new_(Get_id_by_ext_(ext), ext);}

View File

@@ -29,7 +29,7 @@ public class Xof_mime_minor_ {
, Mime_bmp = Bry_.new_a7("x-bmp"), Mime_bmp_2 = Bry_.new_a7("x-ms-bmp");
private static final Hash_adp mime_hash = mime_hash_();
private static Hash_adp mime_hash_() {
Hash_adp rv = Hash_adp_bry.cs_();
Hash_adp rv = Hash_adp_bry.cs();
mime_hash_itm_(rv, Xof_ext_.Bry_png , Xof_ext_.Id_png);
mime_hash_itm_(rv, Xof_ext_.Bry_jpg , Xof_ext_.Id_jpg);
mime_hash_itm_(rv, Xof_ext_.Bry_jpeg , Xof_ext_.Id_jpeg);

View File

@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.xowa.files.exts; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*;
import gplx.core.primitives.*;
public class Xof_rule_grp implements GfoInvkAble {
private final Hash_adp_bry hash = Hash_adp_bry.cs_();
private final Hash_adp_bry hash = Hash_adp_bry.cs();
public Xof_rule_grp(Xof_rule_mgr owner, byte[] key) {this.owner = owner; this.key = key;}
public Xof_rule_mgr Owner() {return owner;} private final Xof_rule_mgr owner;
public byte[] Key() {return key;} private final byte[] key;

View File

@@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.xowa.files.exts; import gplx.*; import gplx.xowa.*; import gplx.xowa.files.*;
import gplx.xowa.apps.*;
public class Xof_rule_mgr implements GfoInvkAble {
private final Hash_adp_bry hash = Hash_adp_bry.cs_();
private final Hash_adp_bry hash = Hash_adp_bry.cs();
public Xof_rule_mgr() {
Xof_rule_grp app_default = new Xof_rule_grp(this, Xof_rule_grp.Grp_app_default);
Set_app_default(app_default, Io_mgr.Len_gb, Xof_ext_.Bry__ary);

View File

@@ -104,7 +104,7 @@ class Fs_root_dir {
public static byte[] Xto_fil_bry(Io_url url) {
byte[] rv = Bry_.new_u8(url.NameAndExt());
rv = Bry_.Replace(rv, Byte_ascii.Space, Byte_ascii.Underline);
rv = Bry_.Upper_1st(rv);
rv = Bry_.Ucase__1st(rv);
return rv;
}
}