예제 #1
0
 // ============================================================
 // <T>序列化数据到输出流。</T>
 //
 // @param output 输出流
 // ============================================================
 @Override
 public void serialize(IDataOutput output) {
   super.serialize(output);
   // 输出渲染集合
   if (hasRenderable()) {
     int count = _renderables.count();
     output.writeUint16(count);
     for (FResRenderable renderable : _renderables) {
       renderable.serialize(output);
     }
   } else {
     output.writeUint16(0);
   }
 }
 // ============================================================
 // <T>序列化内容到数据。</T>
 //
 // @param output 输出流
 // ============================================================
 @Override
 public void serialize(IDataOutput output) {
   super.serialize(output);
   output.writeInt64(_ouid);
   output.writeBoolean(_ovld);
   output.writeString(_guid);
   output.writeInt64(_memberId);
   output.writeString(_productCode);
   output.writeString(_timeSection);
   output.writeInt32(_pv);
   output.writeInt64(_createUserId);
   output.writeInt64(_createDate.get());
   output.writeInt64(_updateUserId);
   output.writeInt64(_updateDate.get());
 }
 // ============================================================
 // <T>序列化内容到数据。</T>
 //
 // @param output 输出流
 // ============================================================
 @Override
 public void serialize(IDataOutput output) {
   super.serialize(output);
   output.writeInt64(_ouid);
   output.writeBoolean(_ovld);
   output.writeString(_guid);
   output.writeInt64(_linkParentId);
   output.writeInt64(_linkId);
   output.writeString(_code);
   output.writeString(_name);
   output.writeString(_label);
   output.writeInt32(_departmentId);
   output.writeString(_departmentLabel);
   output.writeInt32(_regionId);
   output.writeString(_regionLabel);
   output.writeInt32(_level);
   output.writeInt64(_leaderId);
   output.writeString(_leaderLabel);
   output.writeString(_leaderPhone);
   output.writeInt32(_provinceId);
   output.writeString(_provinceLabel);
   output.writeInt32(_cityId);
   output.writeString(_cityLabel);
   output.writeString(_detailAddress);
   output.writeString(_departmentPhone);
   output.writeInt64(_buildDate.get());
   output.writeString(_note);
   output.writeInt64(_createUserId);
   output.writeInt64(_createDate.get());
   output.writeInt64(_updateUserId);
   output.writeInt64(_updateDate.get());
 }
예제 #4
0
 // ============================================================
 // <T>序列化数据到输出流。</T>
 //
 // @param output 输出流
 // ============================================================
 @Override
 public void serialize(IDataOutput output) {
   super.serialize(output);
   // 非压缩模式
   String format = "jpg";
   if (_optionAlpha) {
     format = "png";
   }
   // 转换数据
   if (_textureBitmap == null) {
     // 写入数据
     output.writeString("flat");
     output.writeString(format);
     output.writeUint16(_size.width);
     output.writeUint16(_size.height);
     // output.writeInt32(0);
   } else {
     String code = _textureBitmap.code();
     if (code.equals("environment")) {
       // 分拆为6个面
       output.writeString("cube");
       output.writeString(format);
       output.writeUint16(_size.width);
       output.writeUint16(_size.height);
       // serializeEnvironment(output);
     } else {
       // 写入数据
       output.writeString("flat");
       output.writeString(format);
       output.writeUint16(_size.width);
       output.writeUint16(_size.height);
       // output.writeInt32(0);
     }
   }
   //      // 非压缩模式
   //      String format = "jpg";
   //      if(_optionAlpha){
   //         format = "png";
   //      }
   //      // 转换数据
   //      if(_textureBitmap == null){
   //         //byte[] data = _image.toBytes("png");
   //         //int length = data.length;
   //         // 写入数据
   //         output.writeBoolean(false);
   //         output.writeString("flat");
   //         output.writeString(format);
   //         output.writeUint16(_size.width);
   //         output.writeUint16(_size.height);
   //         output.writeInt32(4 * _data.length);
   //         for(int value : _data){
   //            output.writeUint8((short)((value >> 16) & 0xFF));
   //            output.writeUint8((short)((value >> 8) & 0xFF));
   //            output.writeUint8((short)(value & 0xFF));
   //            output.writeUint8((short)((value >> 24) & 0xFF));
   //         }
   //         //output.writeInt32(length);
   //         //output.write(data, 0, length);
   //      }else{
   //         output.writeBoolean(true);
   //         String code = _textureBitmap.code();
   //         if(code.equals("environment")){
   //            // 分拆为6个面
   //            output.writeString("cube");
   //            output.writeString(format);
   //            output.writeUint16(_size.width);
   //            output.writeUint16(_size.height);
   //            serializeEnvironment(output);
   //         }else{
   //            byte[] data = _textureBitmap.data();
   //            int length = data.length;
   //            // 写入数据
   //            output.writeString("flat");
   //            output.writeString(format);
   //            output.writeUint16(_size.width);
   //            output.writeUint16(_size.height);
   //            output.writeInt32(length);
   //            output.write(data, 0, length);
   //         }
   //      }
 }
예제 #5
0
 // ============================================================
 // <T>序列化内容到数据。</T>
 //
 // @param output 输出流
 // ============================================================
 @Override
 public void serialize(IDataOutput output) {
   super.serialize(output);
   output.writeInt64(_ouid);
   output.writeBoolean(_ovld);
   output.writeString(_guid);
   output.writeInt64(_userId);
   output.writeInt64(_projectId);
   output.writeInt64(_resourceId);
   output.writeString(_code);
   output.writeString(_label);
   output.writeString(_content);
   output.writeString(_note);
   output.writeInt64(_createUserId);
   output.writeInt64(_createDate.get());
   output.writeInt64(_updateUserId);
   output.writeInt64(_updateDate.get());
 }