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


Java ObjectInput.readUTF方法代码示例

本文整理汇总了Java中java.io.ObjectInput.readUTF方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectInput.readUTF方法的具体用法?Java ObjectInput.readUTF怎么用?Java ObjectInput.readUTF使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.io.ObjectInput的用法示例。


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

示例1: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
@Override
public void readExternal(ObjectInput in) throws IOException,
        ClassNotFoundException {

    this.prefix = in.readUTF();
    if ("".equals(this.prefix)) this.prefix = null;
    this.localName = in.readUTF();
    this.owner = in.readUTF();
    this.name = in.readUTF();
    this.types = (String[]) in.readObject();
}
 
开发者ID:sunmingshuai,项目名称:apache-tomcat-7.0.73-with-comment,代码行数:12,代码来源:FunctionMapperImpl.java

示例2: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
	this.value = in.readObject();
	String type = in.readUTF();
	if (!"".equals(type)) {
		this.expectedType = ReflectionUtil.forName(type);
	}
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:9,代码来源:ValueExpressionLiteral.java

示例3: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    this.expr = in.readUTF();
    String type = in.readUTF();
    if (!"".equals(type)) {
        this.expectedType = ReflectionUtil.forName(type);
    }
    this.paramTypes = ReflectionUtil.toTypeArray(((String[]) in
            .readObject()));
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:10,代码来源:MethodExpressionLiteral.java

示例4: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
/**
     * The object implements the readExternal method to restore its
     * contents by calling the methods of DataInput for primitive
     * types and readObject for objects, strings and arrays.  The
     * readExternal method must read the values in the same sequence
     * and with the same types as were written by writeExternal.
     * @exception ClassNotFoundException If the class for an object being
     *              restored cannot be found.
     */
    public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
        String s = in.readUTF();
        if (s == null || s.length() == 0) { // long mime type
            byte[] ba = new byte[in.readInt()];
            in.readFully(ba);
            s = new String(ba);
        }
        try {
            parse(s);
        } catch(MimeTypeParseException e) {
            throw new IOException(e.toString());
        }
    }
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:24,代码来源:MimeType.java

示例5: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
@Override
public void readExternal(ObjectInput in) throws IOException,
        ClassNotFoundException {
    this.value = in.readObject();
    String type = in.readUTF();
    if (!"".equals(type)) {
        this.expectedType = ReflectionUtil.forName(type);
    }
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:10,代码来源:ValueExpressionLiteral.java

示例6: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
@Override
public void readExternal(ObjectInput in) throws IOException,
        ClassNotFoundException {
    this.expr = in.readUTF();
    String type = in.readUTF();
    if (!"".equals(type)) {
        this.expectedType = ReflectionUtil.forName(type);
    }
    this.paramTypes = ReflectionUtil.toTypeArray(((String[]) in
            .readObject()));
    this.fnMapper = (FunctionMapper) in.readObject();
    this.varMapper = (VariableMapper) in.readObject();
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:14,代码来源:MethodExpressionImpl.java

示例7: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
@Override
public void readExternal(ObjectInput in) throws IOException,
        ClassNotFoundException {
    this.expr = in.readUTF();
    String type = in.readUTF();
    if (!"".equals(type)) {
        this.expectedType = ReflectionUtil.forName(type);
    }
    this.fnMapper = (FunctionMapper) in.readObject();
    this.varMapper = (VariableMapper) in.readObject();
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:12,代码来源:ValueExpressionImpl.java

示例8: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    this.expr = in.readUTF();
    String type = in.readUTF();
    if (!"".equals(type)) {
        this.expectedType = ReflectionUtil.forName(type);
    }
    this.paramTypes = ReflectionUtil.toTypeArray(((String[]) in
            .readObject()));
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:11,代码来源:MethodExpressionLiteral.java

示例9: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    /* byte version = */ in.readByte(); // version
    type = in.readUTF();
    subType = in.readUTF();
    // allow for more data from future version
    int extra = in.readShort();
    if (extra > 0) {
        byte[] extraBytes = new byte[extra];
        in.read(extraBytes, 0, extra);
    }
}
 
开发者ID:abhijitvalluri,项目名称:fitnotifications,代码行数:13,代码来源:MeasureUnit.java

示例10: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
@Override
public void readExternal(final ObjectInput arg0)
        throws IOException, ClassNotFoundException {
    // call super method
    super.readExternal(arg0);

    // read labels
    m_labels = new String[arg0.readInt()];
    for (int l = 0; l < m_labels.length; l++) {
        m_labels[l] = arg0.readUTF();
    }

}
 
开发者ID:knime,项目名称:knime-activelearning,代码行数:14,代码来源:MultiClassKNFST.java

示例11: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
public void readExternal(ObjectInput in) throws IOException,
        ClassNotFoundException {
    this.expr = in.readUTF();
    String type = in.readUTF();
    if (!"".equals(type)) {
        this.expectedType = ReflectionUtil.forName(type);
    }
    this.paramTypes = ReflectionUtil.toTypeArray(((String[]) in
            .readObject()));
    this.fnMapper = (FunctionMapper) in.readObject();
    this.varMapper = (VariableMapper) in.readObject();
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:13,代码来源:MethodExpressionImpl.java

示例12: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
	this.mark = in.readUTF();
	this.target = (ValueExpression) in.readObject();
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:6,代码来源:JspValueExpression.java

示例13: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
/**
 * We read back the data to create a new ATAV. The structure
 * read is exposed in the {@link Ava#writeExternal(ObjectOutput)}
 * method
 * 
 * @see Externalizable#readExternal(ObjectInput)
 * 
 * @throws IOException If the Ava can't b written to the stream
 * @throws ClassNotFoundException If we can't deserialize an Ava from the stream
 */
@Override
public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
{
    boolean hasUpName = in.readBoolean();

    if ( hasUpName )
    {
        upName = in.readUTF();
    }

    boolean hasUpType = in.readBoolean();

    if ( hasUpType )
    {
        upType = in.readUTF();
    }

    boolean hasNormType = in.readBoolean();

    if ( hasNormType )
    {
        normType = in.readUTF();
    }

    if ( schemaManager != null )
    {
        if ( !Strings.isEmpty( upType ) )
        {
            attributeType = schemaManager.getAttributeType( upType );
        }
        else
        {
            attributeType = schemaManager.getAttributeType( normType );
        }
    }

    in.readBoolean();

    value = Value.deserialize( attributeType, in );

    h = in.readInt();
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:53,代码来源:Ava.java

示例14: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
/**
 * We read back the data to create a new RDB. The structure
 * read is exposed in the {@link Rdn#writeExternal(ObjectOutput)}
 * method
 *
 * @see Externalizable#readExternal(ObjectInput)
 * @param in The input stream from which the Rdn will be read
 * @throws IOException If we can't read from the input stream
 * @throws ClassNotFoundException If we can't create a new Rdn
 */
@Override
public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
{
    StringBuilder sb = new StringBuilder();
    
    // Read the Ava number
    nbAvas = in.readInt();

    // Read the UPName
    upName = in.readUTF();

    switch ( nbAvas )
    {
        case 0:
            ava = null;
            normName = "";
            break;

        case 1:
            ava = new Ava( schemaManager );
            ava.readExternal( in );
            avaType = ava.getNormType();
            
            buildNormRdn( sb, ava );
            normName = sb.toString();

            break;

        default:
            avas = new ArrayList<>();
            avaTypes = new HashMap<>();
            boolean isFirst = true;

            for ( int i = 0; i < nbAvas; i++ )
            {
                Ava newAva = new Ava( schemaManager );
                newAva.readExternal( in );
                avas.add( newAva );

                List<Ava> avaList = avaTypes.get( newAva.getNormType() );
                
                if ( avaList == null )
                {
                    avaList = new ArrayList<>();
                    avaTypes.put( newAva.getNormType(), avaList );
                }

                if ( isFirst )
                {
                    isFirst = false;
                }
                else
                {
                    sb.append( '+' );
                }
                
                buildNormRdn( sb, newAva );

                avaList.add( newAva );
            }

            ava = null;
            avaType = null;
            normName = sb.toString();

            break;
    }

    h = in.readInt();
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:81,代码来源:Rdn.java

示例15: readExternal

import java.io.ObjectInput; //导入方法依赖的package包/类
@Override
public void readExternal(ObjectInput in) throws IOException,
        ClassNotFoundException {
    this.mark = in.readUTF();
    this.target = (MethodExpression) in.readObject();
}
 
开发者ID:sunmingshuai,项目名称:apache-tomcat-7.0.73-with-comment,代码行数:7,代码来源:JspMethodExpression.java


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