FileDocCategorySizeDatePackage
ObjectWriter.javaAPI DocJava SE 5 API4753Fri Aug 26 14:54:28 BST 2005com.sun.corba.se.impl.orbutil

ObjectWriter

public abstract class ObjectWriter extends Object

Fields Summary
protected StringBuffer
result
Constructors Summary
protected ObjectWriter()

	result = new StringBuffer() ;
    
Methods Summary
public voidappend(short arg)

 result.append( arg ) ; 
public voidappend(int arg)

 result.append( arg ) ; 
public voidappend(long arg)

 result.append( arg ) ; 
public voidappend(float arg)

 result.append( arg ) ; 
public voidappend(double arg)

 result.append( arg ) ; 
public voidappend(java.lang.String arg)

 result.append( arg ) ; 
public voidappend(boolean arg)

 result.append( arg ) ; 
public voidappend(char arg)

 result.append( arg ) ; 
protected voidappendObjectHeader(java.lang.Object obj)

	result.append( obj.getClass().getName() ) ;
	result.append( "<" ) ;
	result.append( System.identityHashCode( obj ) ) ;
	result.append( ">" ) ;
	Class compClass = obj.getClass().getComponentType() ;

	if (compClass != null) {
	    result.append( "[" ) ;
	    if (compClass == boolean.class) {
		boolean[] arr = (boolean[])obj ;
		result.append( arr.length ) ;
		result.append( "]" ) ;
	    } else if (compClass == byte.class) {
		byte[] arr = (byte[])obj ;
		result.append( arr.length ) ;
		result.append( "]" ) ;
	    } else if (compClass == short.class) {
		short[] arr = (short[])obj ;
		result.append( arr.length ) ;
		result.append( "]" ) ;
	    } else if (compClass == int.class) {
		int[] arr = (int[])obj ;
		result.append( arr.length ) ;
		result.append( "]" ) ;
	    } else if (compClass == long.class) {
		long[] arr = (long[])obj ;
		result.append( arr.length ) ;
		result.append( "]" ) ;
	    } else if (compClass == char.class) {
		char[] arr = (char[])obj ;
		result.append( arr.length ) ;
		result.append( "]" ) ;
	    } else if (compClass == float.class) {
		float[] arr = (float[])obj ;
		result.append( arr.length ) ;
		result.append( "]" ) ;
	    } else if (compClass == double.class) {
		double[] arr = (double[])obj ;
		result.append( arr.length ) ;
		result.append( "]" ) ;
	    } else { // array of object
		java.lang.Object[] arr = (java.lang.Object[])obj ;
		result.append( arr.length ) ;
		result.append( "]" ) ;
	    }
	}

	result.append( "(" ) ;
    
public abstract voidendElement()

public abstract voidendObject(java.lang.String str)

public abstract voidendObject()

public static com.sun.corba.se.impl.orbutil.ObjectWritermake(boolean isIndenting, int initialLevel, int increment)

	if (isIndenting)
	    return new IndentingObjectWriter( initialLevel, increment ) ;
	else
	    return new SimpleObjectWriter() ;
    
public abstract voidstartElement()

public abstract voidstartObject(java.lang.Object obj)

public java.lang.StringtoString()

 return result.toString() ;