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

@@ -18,12 +18,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
package gplx.xowa; import gplx.*;
public class Xot_tmpl_wtr {
public byte[] Write_all(Xop_ctx ctx, Xop_root_tkn root, byte[] src) {
Bry_bfr rslt_bfr = ctx.App().Utl__bfr_mkr().Get_m001();
ctx.Tmpl_output_(rslt_bfr);
rslt_bfr.Reset_if_gt(Io_mgr.Len_mb);
Write_tkn(ctx, src, src.length, rslt_bfr, root);
ctx.Tmpl_output_(null);
return rslt_bfr.To_bry_and_rls();
// synchronized (this) { // THREAD:added synchronized after "failed to write tkn" DATE:2015-04-29
Bry_bfr rslt_bfr = ctx.App().Utl__bfr_mkr().Get_m001();
ctx.Tmpl_output_(rslt_bfr);
rslt_bfr.Reset_if_gt(Io_mgr.Len_mb);
Write_tkn(ctx, src, src.length, rslt_bfr, root);
ctx.Tmpl_output_(null);
return rslt_bfr.To_bry_and_rls();
// }
}
private void Write_tkn(Xop_ctx ctx, byte[] src, int src_len, Bry_bfr rslt_bfr, Xop_tkn_itm tkn) {
switch (tkn.Tkn_tid()) {