当前位置: 首页>>代码示例>>Java>>正文


Java Base64Encoder类代码示例

本文整理汇总了Java中com.openbravo.pos.util.Base64Encoder的典型用法代码示例。如果您正苦于以下问题:Java Base64Encoder类的具体用法?Java Base64Encoder怎么用?Java Base64Encoder使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Base64Encoder类属于com.openbravo.pos.util包,在下文中一共展示了Base64Encoder类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createValue

import com.openbravo.pos.util.Base64Encoder; //导入依赖的package包/类
public Object createValue() throws BasicException {
    Object[] resource = new Object[4];

    resource[0] = m_oId == null ? UUID.randomUUID().toString() : m_oId;
    resource[1] = m_jName.getText();
    
    ResourceType restype = (ResourceType) m_ResourceModel.getSelectedItem();
    resource[2] = restype.getKey();
    if (restype == ResourceType.TEXT) {
        resource[3] = Formats.BYTEA.parseValue(m_jText.getText());
    } else if (restype == ResourceType.IMAGE) {
        resource[3] = ImageUtils.writeImage(m_jImage.getImage());
    } else if (restype == ResourceType.BINARY) {
        resource[3] = Base64Encoder.decode(m_jText.getText());
    } else {
        resource[3] = null;
    }

    return resource;
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:21,代码来源:ResourcesView.java

示例2: createValue

import com.openbravo.pos.util.Base64Encoder; //导入依赖的package包/类
/**
 *
 * @return
 * @throws BasicException
 */
@Override
public Object createValue() throws BasicException {
    Object[] resource = new Object[4];

    resource[0] = m_oId == null ? UUID.randomUUID().toString() : m_oId;
    resource[1] = m_jName.getText();
    
    ResourceType restype = (ResourceType) m_ResourceModel.getSelectedItem();
    resource[2] = restype.getKey();
    if (restype == ResourceType.TEXT) {
        resource[3] = Formats.BYTEA.parseValue(m_jText.getText());
    } else if (restype == ResourceType.IMAGE) {
        resource[3] = ImageUtils.writeImage(m_jImage.getImage());
    } else if (restype == ResourceType.BINARY) {
        resource[3] = Base64Encoder.decode(m_jText.getText());
    } else {
        resource[3] = null;
    }

    return resource;
}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:27,代码来源:ResourcesView.java

示例3: createValue

import com.openbravo.pos.util.Base64Encoder; //导入依赖的package包/类
public Object createValue() throws BasicException {
    Object[] resource = new Object[4];

    resource[0] = m_oId == null ? UUID.randomUUID().toString() : m_oId;
    resource[1] = m_jName.getText();

    ResourceType restype = (ResourceType) m_ResourceModel.getSelectedItem();
    resource[2] = restype.getKey();
    if (restype == ResourceType.TEXT) {
        resource[3] = Formats.BYTEA.parseValue(m_jText.getText());
    } else if (restype == ResourceType.IMAGE) {
        resource[3] = ImageUtils.writeImage(m_jImage.getImage());
    } else if (restype == ResourceType.BINARY) {
        resource[3] = Base64Encoder.decode(m_jText.getText());
    } else {
        resource[3] = null;
    }

    return resource;
}
 
开发者ID:nordpos,项目名称:nordpos,代码行数:21,代码来源:ResourcesView.java

示例4: writeValueDelete

import com.openbravo.pos.util.Base64Encoder; //导入依赖的package包/类
public void writeValueDelete(Object value) {
    Object[] resource = (Object[]) value;
    m_oId = resource[0];
    m_jName.setText((String) resource[1]);
    m_ResourceModel.setSelectedKey(resource[2]);
    
    ResourceType restype = (ResourceType) m_ResourceModel.getSelectedItem();
    if (restype == ResourceType.TEXT) {
        m_jText.setText(Formats.BYTEA.formatValue(resource[3]));
        m_jText.setCaretPosition(0);
        m_jImage.setImage(null);
    } else if (restype == ResourceType.IMAGE) {
        m_jText.setText(null);
        m_jImage.setImage(ImageUtils.readImage((byte[]) resource[3]));
    } else if (restype == ResourceType.BINARY) {
        m_jText.setText(resource[3] == null
                ? null
                : Base64Encoder.encodeChunked((byte[]) resource[3]));
        m_jText.setCaretPosition(0);
        m_jImage.setImage(null);
    } else {
        m_jText.setText(null);
        m_jImage.setImage(null);
    }
    m_jName.setEnabled(false);
    m_jType.setEnabled(false);
    m_jText.setEnabled(false);
    m_jImage.setEnabled(false);       
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:30,代码来源:ResourcesView.java

示例5: writeValueEdit

import com.openbravo.pos.util.Base64Encoder; //导入依赖的package包/类
public void writeValueEdit(Object value) {
    Object[] resource = (Object[]) value;
    m_oId = resource[0];
    m_jName.setText((String) resource[1]);
    m_ResourceModel.setSelectedKey(resource[2]);
    
    ResourceType restype = (ResourceType) m_ResourceModel.getSelectedItem();
    if (restype == ResourceType.TEXT) {
        m_jText.setText(Formats.BYTEA.formatValue(resource[3]));
        m_jText.setCaretPosition(0);
        m_jImage.setImage(null);
    } else if (restype == ResourceType.IMAGE) {
        m_jText.setText(null);
        m_jImage.setImage(ImageUtils.readImage((byte[]) resource[3]));
    } else if (restype == ResourceType.BINARY) {
        m_jText.setText(resource[2] == null
                ? null
                : Base64Encoder.encodeChunked((byte[]) resource[3]));
        m_jText.setCaretPosition(0);
        m_jImage.setImage(null);
    } else {
        m_jText.setText(null);
        m_jImage.setImage(null);
    }
    m_jName.setEnabled(true);
    m_jType.setEnabled(true);
    m_jText.setEnabled(true);
    m_jImage.setEnabled(true);
}
 
开发者ID:iMartinezMateu,项目名称:openbravo-pos,代码行数:30,代码来源:ResourcesView.java

示例6: writeValueDelete

import com.openbravo.pos.util.Base64Encoder; //导入依赖的package包/类
/**
 *
 * @param value
 */
@Override
public void writeValueDelete(Object value) {
    Object[] resource = (Object[]) value;
    m_oId = resource[0];
    m_jName.setText((String) resource[1]);
    m_ResourceModel.setSelectedKey(resource[2]);
    
    ResourceType restype = (ResourceType) m_ResourceModel.getSelectedItem();
    if (restype == ResourceType.TEXT) {
        m_jText.setText(Formats.BYTEA.formatValue(resource[3]));
        m_jText.setCaretPosition(0);
        m_jImage.setImage(null);
    } else if (restype == ResourceType.IMAGE) {
        m_jText.setText(null);
        m_jImage.setImage(ImageUtils.readImage((byte[]) resource[3]));
    } else if (restype == ResourceType.BINARY) {
        m_jText.setText(resource[3] == null
                ? null
                : Base64Encoder.encodeChunked((byte[]) resource[3]));
        m_jText.setCaretPosition(0);
        m_jImage.setImage(null);
    } else {
        m_jText.setText(null);
        m_jImage.setImage(null);
    }
    m_jName.setEnabled(false);
    m_jType.setEnabled(false);
    m_jText.setEnabled(false);
    m_jImage.setEnabled(false);       
}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:35,代码来源:ResourcesView.java

示例7: writeValueEdit

import com.openbravo.pos.util.Base64Encoder; //导入依赖的package包/类
/**
 *
 * @param value
 */
@Override
public void writeValueEdit(Object value) {
    Object[] resource = (Object[]) value;
    m_oId = resource[0];
    m_jName.setText((String) resource[1]);
    m_ResourceModel.setSelectedKey(resource[2]);
    
    ResourceType restype = (ResourceType) m_ResourceModel.getSelectedItem();
    if (restype == ResourceType.TEXT) {
        m_jText.setText(Formats.BYTEA.formatValue(resource[3]));
        m_jText.setCaretPosition(0);
        m_jImage.setImage(null);
    } else if (restype == ResourceType.IMAGE) {
        m_jText.setText(null);
        m_jImage.setImage(ImageUtils.readImage((byte[]) resource[3]));
    } else if (restype == ResourceType.BINARY) {
        m_jText.setText(resource[2] == null
                ? null
                : Base64Encoder.encodeChunked((byte[]) resource[3]));
        m_jText.setCaretPosition(0);
        m_jImage.setImage(null);
    } else {
        m_jText.setText(null);
        m_jImage.setImage(null);
    }
    m_jName.setEnabled(true);
    m_jType.setEnabled(true);
    m_jText.setEnabled(true);
    m_jImage.setEnabled(true);
}
 
开发者ID:gnoopy,项目名称:wifepos,代码行数:35,代码来源:ResourcesView.java

示例8: writeValueDelete

import com.openbravo.pos.util.Base64Encoder; //导入依赖的package包/类
public void writeValueDelete(Object value) {
    Object[] resource = (Object[]) value;
    m_oId = resource[0];
    m_jName.setText((String) resource[1]);
    m_ResourceModel.setSelectedKey(resource[2]);

    ResourceType restype = (ResourceType) m_ResourceModel.getSelectedItem();
    if (restype == ResourceType.TEXT) {
        m_jText.setText(Formats.BYTEA.formatValue(resource[3]));
        m_jText.setCaretPosition(0);
        m_jImage.setImage(null);
    } else if (restype == ResourceType.IMAGE) {
        m_jText.setText(null);
        m_jImage.setImage(ImageUtils.readImage((byte[]) resource[3]));
    } else if (restype == ResourceType.BINARY) {
        m_jText.setText(resource[3] == null
                ? null
                : Base64Encoder.encodeChunked((byte[]) resource[3]));
        m_jText.setCaretPosition(0);
        m_jImage.setImage(null);
    } else {
        m_jText.setText(null);
        m_jImage.setImage(null);
    }
    m_jName.setEnabled(false);
    m_jType.setEnabled(false);
    m_jText.setEnabled(false);
    m_jImage.setEnabled(false);
}
 
开发者ID:nordpos,项目名称:nordpos,代码行数:30,代码来源:ResourcesView.java

示例9: writeValueEdit

import com.openbravo.pos.util.Base64Encoder; //导入依赖的package包/类
public void writeValueEdit(Object value) {
    Object[] resource = (Object[]) value;
    m_oId = resource[0];
    String sResourceName = (String) resource[1];
    m_jName.setText(sResourceName);
    m_jName.setBackground(null);
    m_ResourceModel.setSelectedKey(resource[2]);

    ResourceType restype = (ResourceType) m_ResourceModel.getSelectedItem();
    if (restype == ResourceType.TEXT) {
        m_jText.setText(Formats.BYTEA.formatValue(resource[3]));
        if (sResourceName.toLowerCase().startsWith("printer.")
                || sResourceName.toLowerCase().startsWith("role.")
                || sResourceName.toLowerCase().startsWith("ticket.")
                || sResourceName.endsWith("/properties")) {
            m_jText.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_XML);
        } else if (sResourceName.toLowerCase().startsWith("menu.")
                || sResourceName.toLowerCase().startsWith("payment.")
                || sResourceName.toLowerCase().startsWith("script.")
                || sResourceName.toLowerCase().startsWith("event.")
                || sResourceName.toLowerCase().startsWith("code.")) {
            m_jText.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_JAVA);
        } else {
            m_jText.setSyntaxEditingStyle(SyntaxConstants.SYNTAX_STYLE_NONE);
        }

        m_jText.setCaretPosition(0);
        m_jImage.setImage(null);
    } else if (restype == ResourceType.IMAGE) {
        m_jText.setText(null);
        m_jImage.setImage(ImageUtils.readImage((byte[]) resource[3]));
    } else if (restype == ResourceType.BINARY) {
        m_jText.setText(resource[2] == null
                ? null
                : Base64Encoder.encodeChunked((byte[]) resource[3]));
        m_jText.setCaretPosition(0);
        m_jImage.setImage(null);
    } else {
        m_jText.setText(null);
        m_jImage.setImage(null);
    }
    m_jName.setEnabled(true);
    m_jType.setEnabled(true);
    m_jText.setEnabled(true);
    m_jImage.setEnabled(true);
}
 
开发者ID:nordpos,项目名称:nordpos,代码行数:47,代码来源:ResourcesView.java


注:本文中的com.openbravo.pos.util.Base64Encoder类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。