Package bm.core.io

Examples of bm.core.io.SerializerOutputStream.writeByte()


            binding.open( url );
            final DataOutputStream dos = binding.beginPost();
            final ChecksumedOutputStream cos = new ChecksumedOutputStream( dos );
            final DataOutputStream dos2 = new DataOutputStream( cos );
            final SerializerOutputStream out = new SerializerOutputStream( dos2 );
            out.writeByte( VERSION );
            out.writeByte( (byte) (encrypted ? 1 : 0) );
            out.writeString( Net.getDeviceGuid() != null ? Net.getDeviceGuid() : "" );
            out.writeLong( Net.getDeviceId() != null ? Net.getDeviceId().longValue() : 0 );
            serialize( out );
            final long crc  = cos.getCRC();
View Full Code Here


            final DataOutputStream dos = binding.beginPost();
            final ChecksumedOutputStream cos = new ChecksumedOutputStream( dos );
            final DataOutputStream dos2 = new DataOutputStream( cos );
            final SerializerOutputStream out = new SerializerOutputStream( dos2 );
            out.writeByte( VERSION );
            out.writeByte( (byte) (encrypted ? 1 : 0) );
            out.writeString( Net.getDeviceGuid() != null ? Net.getDeviceGuid() : "" );
            out.writeLong( Net.getDeviceId() != null ? Net.getDeviceId().longValue() : 0 );
            serialize( out );
            final long crc  = cos.getCRC();
            out.writeString( "END_OF_DATA" );
View Full Code Here

        {
            throw new RSException( 0, e );
        }
        final Store rs = index.getRecordStore();
        out.writeInt( index.getOrder() );
        out.writeByte( (byte) index.getType() );
        out.writeBoolean( index.isCaseSensitive() );
        numRecords = rs.getNumRecords();
        System.out.println( "Writing " + numRecords + " records" );
        out.writeInt( numRecords );
        for( int i = 1; i <= numRecords; i++ )
View Full Code Here

        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
        final SerializerOutputStream out = new SerializerOutputStream( baos );

        try
        {
            out.writeByte( (byte) 1 );
            out.writeInt( id );
            out.writeString( ViewCompiler.escape( title ) );
            out.writeNullableString( controller );

            int count = actions.size();
View Full Code Here

        try
        {
            final ByteArrayOutputStream baos = new ByteArrayOutputStream();
            final SerializerOutputStream out = new SerializerOutputStream( baos );

            out.writeByte( (byte) 1 );
            out.writeString( source );
            out.writeInt( width );
            out.writeInt( height );
            out.flush();
            out.close();
View Full Code Here

        }
        final ByteArrayOutputStream     baos = new ByteArrayOutputStream();
        final SerializerOutputStream    out = new SerializerOutputStream( baos );

        baos.reset();
        out.writeByte( Constants.DBRT_TABLE_INFO );
        info.serialize( out );
        byte[] data = baos.toByteArray();
        int recordId = rs.addRecord( data, 0, data.length );
        info.setRecordId( recordId );
        log.debug( "saved table info in " + data.length + " bytes" );
View Full Code Here

        log.debug( "saved table info in " + data.length + " bytes" );

        final TableStatus status = new TableStatus( this );
        status.setTableName( info.getName() );
        baos.reset();
        out.writeByte( Constants.DBRT_TABLE_STATUS );
        status.serialize( out );
        data = baos.toByteArray();
        recordId = rs.addRecord( data, 0, data.length );
        status.setRecordId( recordId );
        log.debug( "saved table status in " + data.length + " bytes" );
View Full Code Here

    {
        try
        {
            final ByteArrayOutputStream baos = new ByteArrayOutputStream();
            final SerializerOutputStream dos = new SerializerOutputStream( baos );
            dos.writeByte( Constants.DBRT_TABLE_STATUS );
            status.serialize( dos );
            open();
            final byte[] data = baos.toByteArray();
            rs.setRecord( status.getRecordId(), data, 0, data.length );
        }
View Full Code Here

    {
        try
        {
            final ByteArrayOutputStream baos = new ByteArrayOutputStream();
            final SerializerOutputStream dos = new SerializerOutputStream( baos );
            dos.writeByte( Constants.DBRT_TABLE_INFO );
            info.serialize( dos );
            open();
            final byte[] data = baos.toByteArray();
            rs.setRecord( info.getRecordId(), data, 0, data.length );
        }
View Full Code Here

        {
            throw new RSException( 0, e );
        }
        final Store rs = index.getRecordStore();
        out.writeInt( index.getOrder() );
        out.writeByte( (byte) index.getType() );
        out.writeBoolean( index.isCaseSensitive() );
        numRecords = rs.getNumRecords();
        System.out.println( "Writing " + numRecords + " records" );
        out.writeInt( numRecords );
        for( int i = 1; i <= numRecords; i++ )
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.