• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Base64Encoder类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了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;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Attribute类代码示例发布时间:2022-05-22
下一篇:
Java UploadOptions类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap