⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 schemabase64binary.java

📁 java 3d game jme 工程开发源代码
💻 JAVA
字号:
/**
 * SchemaBase64Binary.java
 *
 * This file was generated by XMLSpy 2007sp2 Enterprise Edition.
 *
 * YOU SHOULD NOT MODIFY THIS FILE, BECAUSE IT WILL BE
 * OVERWRITTEN WHEN YOU RE-RUN CODE GENERATION.
 *
 * Refer to the XMLSpy Documentation for further details.
 * http://www.altova.com/xmlspy
 */


package com.jmex.xml.types;


public class SchemaBase64Binary extends SchemaBinaryBase {
  // construction
  public SchemaBase64Binary() {
    super();
  }

  public SchemaBase64Binary(SchemaBase64Binary newvalue) {
    value = newvalue.value;
    isempty = newvalue.isempty;
    isnull = newvalue.isnull;
  }

  public SchemaBase64Binary(byte[] newvalue) {
    setValue( newvalue );
  }

  public SchemaBase64Binary(String newvalue) {
    parse( newvalue );
  }

  public SchemaBase64Binary(SchemaType newvalue) {
    assign( newvalue );
  }

  public SchemaBase64Binary(SchemaTypeBinary newvalue) {
    assign( (SchemaType)newvalue );
  }

  // getValue, setValue
  public void parse(String s) {
	  
	String newvalue = SchemaNormalizedString.normalize(SchemaNormalizedString.WHITESPACE_COLLAPSE, s);

    if( newvalue == null )
      setNull();
    else if( newvalue.length() == 0)
      setEmpty();
    else {
      setNull();
	  try {
	    value = new sun.misc.BASE64Decoder().decodeBuffer(newvalue);
        isnull = false;
        isempty = ( value.length == 0 ) ? true : false;
	  }
	  catch( java.io.IOException e ) {
		value = null;
	  }
    }
  }

  // further
  public int hashCode() {
    return value.hashCode();
  }

  public boolean equals(Object obj) {
    if (! (obj instanceof SchemaBase64Binary))
      return false;
    return value.equals(( (SchemaBase64Binary) obj).value);
  }

  public Object clone() {
    return new SchemaBase64Binary( this );
  }

  public String toString() {
    if( isempty || isnull || value == null )
      return "";
    String sResult = new sun.misc.BASE64Encoder().encode(value);
	return sResult.replaceAll( "\r", "" );
  }

  // ---------- interface SchemaTypeBinary ----------
  public int binaryType() {
	  return BINARY_VALUE_BASE64;
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -