All Downloads are FREE. Search and download functionalities are using the official Maven repository.

webit.script.core.text.impl.ByteArrayTextStatment Maven / Gradle / Ivy

There is a newer version: 1.5.2
Show newest version
// Copyright (c) 2013, Webit Team. All Rights Reserved.
package webit.script.core.text.impl;

import webit.script.Context;
import webit.script.core.ast.AbstractStatment;
import webit.script.core.ast.Optimizable;

/**
 *
 * @author Zqq
 */
public final class ByteArrayTextStatment extends AbstractStatment implements Optimizable {

    private final byte[] bytes;

    public ByteArrayTextStatment(byte[] bytes, int line, int column) {
        super(line, column);
        this.bytes = bytes;
    }

    public Object execute(final Context context) {
        context.out(bytes);
        return null;
    }

    public ByteArrayTextStatment optimize() {
        return bytes != null && bytes.length > 0 ? this : null;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy