Java Code Examples for java.io.ObjectOutput.writeByte()

The following are Jave code examples for showing how to use writeByte() of the java.io.ObjectOutput class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: HCFCore   File: TCharArrayList.java   Source Code and License Vote up 6 votes
public void writeExternal( ObjectOutput out ) throws IOException {
	// VERSION
	out.writeByte( 0 );

	// POSITION
	out.writeInt( _pos );

	// NO_ENTRY_VALUE
	out.writeChar( no_entry_value );

	// ENTRIES
	int len = _data.length;
	out.writeInt( len );
	for( int i = 0; i < len; i++ ) {
		out.writeChar( _data[ i ] );
	}
}
 
Example 2
Project: incubator-netbeans   File: HeapWalkerUI.java   Source Code and License Vote up 5 votes
public void writeExternal(ObjectOutput out) throws IOException {
    super.writeExternal(out);
    
    out.writeByte(PERSISTENCE_VERSION_MAJOR);
    out.writeByte(PERSISTENCE_VERSION_MINOR);
    
    out.writeUTF(Utilities.toURI(heapWalker.getHeapDumpFile()).toString());
}
 
Example 3
Project: HCFCore   File: TFloatFloatHash.java   Source Code and License Vote up 5 votes
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
    // VERSION
	out.writeByte( 0 );

    // SUPER
	super.writeExternal( out );

	// NO_ENTRY_KEY
	out.writeFloat( no_entry_key );

	// NO_ENTRY_VALUE
	out.writeFloat( no_entry_value );
}
 
Example 4
Project: HCFCore   File: TFloatShortHash.java   Source Code and License Vote up 5 votes
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
    // VERSION
	out.writeByte( 0 );

    // SUPER
	super.writeExternal( out );

	// NO_ENTRY_KEY
	out.writeFloat( no_entry_key );

	// NO_ENTRY_VALUE
	out.writeShort( no_entry_value );
}
 
Example 5
Project: HCFCore   File: TByteListDecorator.java   Source Code and License Vote up 5 votes
public void writeExternal( ObjectOutput out ) throws IOException {
    // VERSION
    out.writeByte(0);

    // LIST
    out.writeObject( list );
}
 
Example 6
Project: HCFCore   File: TDoubleArrayStack.java   Source Code and License Vote up 5 votes
public void writeExternal( ObjectOutput out ) throws IOException {
	// VERSION
	out.writeByte( 0 );

	// LIST
	out.writeObject( _list );
}
 
Example 7
Project: HCFCore   File: TByteIntHash.java   Source Code and License Vote up 5 votes
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
    // VERSION
	out.writeByte( 0 );

    // SUPER
	super.writeExternal( out );

	// NO_ENTRY_KEY
	out.writeByte( no_entry_key );

	// NO_ENTRY_VALUE
	out.writeInt( no_entry_value );
}
 
Example 8
Project: HCFCore   File: TFloatDoubleHash.java   Source Code and License Vote up 5 votes
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
    // VERSION
	out.writeByte( 0 );

    // SUPER
	super.writeExternal( out );

	// NO_ENTRY_KEY
	out.writeFloat( no_entry_key );

	// NO_ENTRY_VALUE
	out.writeDouble( no_entry_value );
}
 
Example 9
Project: HCFCore   File: TFloatListDecorator.java   Source Code and License Vote up 5 votes
public void writeExternal( ObjectOutput out ) throws IOException {
    // VERSION
    out.writeByte(0);

    // LIST
    out.writeObject( list );
}
 
Example 10
Project: xcc   File: TLongCharHash.java   Source Code and License Vote up 5 votes
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
    // VERSION
	out.writeByte( 0 );

    // SUPER
	super.writeExternal( out );

	// NO_ENTRY_KEY
	out.writeLong( no_entry_key );

	// NO_ENTRY_VALUE
	out.writeChar( no_entry_value );
}
 
Example 11
Project: OpenJSharp   File: Ser.java   Source Code and License Vote up 5 votes
private static void writeInternal(byte type, Object object, ObjectOutput out) throws IOException {
    out.writeByte(type);
    switch (type) {
        case CHRONO_TYPE:
            ((AbstractChronology) object).writeExternal(out);
            break;
        case CHRONO_LOCAL_DATE_TIME_TYPE:
            ((ChronoLocalDateTimeImpl<?>) object).writeExternal(out);
            break;
        case CHRONO_ZONE_DATE_TIME_TYPE:
            ((ChronoZonedDateTimeImpl<?>) object).writeExternal(out);
            break;
        case JAPANESE_DATE_TYPE:
            ((JapaneseDate) object).writeExternal(out);
            break;
        case JAPANESE_ERA_TYPE:
            ((JapaneseEra) object).writeExternal(out);
            break;
        case HIJRAH_DATE_TYPE:
            ((HijrahDate) object).writeExternal(out);
            break;
        case MINGUO_DATE_TYPE:
            ((MinguoDate) object).writeExternal(out);
            break;
        case THAIBUDDHIST_DATE_TYPE:
            ((ThaiBuddhistDate) object).writeExternal(out);
            break;
        case CHRONO_PERIOD_TYPE:
            ((ChronoPeriodImpl) object).writeExternal(out);
            break;
        default:
            throw new InvalidClassException("Unknown serialized type");
    }
}
 
Example 12
Project: xcc   File: TDoubleFloatHash.java   Source Code and License Vote up 5 votes
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
    // VERSION
	out.writeByte( 0 );

    // SUPER
	super.writeExternal( out );

	// NO_ENTRY_KEY
	out.writeDouble( no_entry_key );

	// NO_ENTRY_VALUE
	out.writeFloat( no_entry_value );
}
 
Example 13
Project: xcc   File: TLongIntHash.java   Source Code and License Vote up 5 votes
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
    // VERSION
	out.writeByte( 0 );

    // SUPER
	super.writeExternal( out );

	// NO_ENTRY_KEY
	out.writeLong( no_entry_key );

	// NO_ENTRY_VALUE
	out.writeInt( no_entry_value );
}
 
Example 14
Project: xcc   File: TShortDoubleHash.java   Source Code and License Vote up 5 votes
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
    // VERSION
	out.writeByte( 0 );

    // SUPER
	super.writeExternal( out );

	// NO_ENTRY_KEY
	out.writeShort( no_entry_key );

	// NO_ENTRY_VALUE
	out.writeDouble( no_entry_value );
}
 
Example 15
Project: HCFCore   File: TCustomObjectHash.java   Source Code and License Vote up 5 votes
@Override
public void writeExternal( ObjectOutput out ) throws IOException {

    // VERSION
    out.writeByte( 0 );

    // SUPER
    super.writeExternal( out );

 // STRATEGY
 out.writeObject( strategy );
}
 
Example 16
Project: xcc   File: TCharArrayStack.java   Source Code and License Vote up 5 votes
public void writeExternal( ObjectOutput out ) throws IOException {
	// VERSION
	out.writeByte( 0 );

	// LIST
	out.writeObject( _list );
}
 
Example 17
Project: HCFCore   File: TCharFloatHash.java   Source Code and License Vote up 5 votes
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
    // VERSION
	out.writeByte( 0 );

    // SUPER
	super.writeExternal( out );

	// NO_ENTRY_KEY
	out.writeChar( no_entry_key );

	// NO_ENTRY_VALUE
	out.writeFloat( no_entry_value );
}
 
Example 18
Project: HCFCore   File: TCharIntHash.java   Source Code and License Vote up 5 votes
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
    // VERSION
	out.writeByte( 0 );

    // SUPER
	super.writeExternal( out );

	// NO_ENTRY_KEY
	out.writeChar( no_entry_key );

	// NO_ENTRY_VALUE
	out.writeInt( no_entry_value );
}
 
Example 19
Project: HCFCore   File: TShortCharHash.java   Source Code and License Vote up 5 votes
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
    // VERSION
	out.writeByte( 0 );

    // SUPER
	super.writeExternal( out );

	// NO_ENTRY_KEY
	out.writeShort( no_entry_key );

	// NO_ENTRY_VALUE
	out.writeChar( no_entry_value );
}
 
Example 20
Project: jdk8u-jdk   File: Ser.java   Source Code and License Vote up 4 votes
static void writeInternal(byte type, Object object, ObjectOutput out) throws IOException {
    out.writeByte(type);
    switch (type) {
        case DURATION_TYPE:
            ((Duration) object).writeExternal(out);
            break;
        case INSTANT_TYPE:
            ((Instant) object).writeExternal(out);
            break;
        case LOCAL_DATE_TYPE:
            ((LocalDate) object).writeExternal(out);
            break;
        case LOCAL_DATE_TIME_TYPE:
            ((LocalDateTime) object).writeExternal(out);
            break;
        case LOCAL_TIME_TYPE:
            ((LocalTime) object).writeExternal(out);
            break;
        case ZONE_REGION_TYPE:
            ((ZoneRegion) object).writeExternal(out);
            break;
        case ZONE_OFFSET_TYPE:
            ((ZoneOffset) object).writeExternal(out);
            break;
        case ZONE_DATE_TIME_TYPE:
            ((ZonedDateTime) object).writeExternal(out);
            break;
        case OFFSET_TIME_TYPE:
            ((OffsetTime) object).writeExternal(out);
            break;
        case OFFSET_DATE_TIME_TYPE:
            ((OffsetDateTime) object).writeExternal(out);
            break;
        case YEAR_TYPE:
            ((Year) object).writeExternal(out);
            break;
        case YEAR_MONTH_TYPE:
            ((YearMonth) object).writeExternal(out);
            break;
        case MONTH_DAY_TYPE:
            ((MonthDay) object).writeExternal(out);
            break;
        case PERIOD_TYPE:
            ((Period) object).writeExternal(out);
            break;
        default:
            throw new InvalidClassException("Unknown serialized type");
    }
}