Esempio n. 1
0
        public void writeExternal(ObjectOutput objectOutput)
        {
            // Write binary words sizes.
            objectOutput.writeInt(prefixSizeInBytes);
            objectOutput.writeInt(descIndexSizeInBytes);

            // Write possible lengths.
            int sizeOfLengths = possibleLengths.size();

            objectOutput.writeInt(sizeOfLengths);
            foreach (Integer length in possibleLengths)
            {
                objectOutput.writeInt(length);
            }

            // Write description pool size.
            objectOutput.writeInt(descriptionPool.Length);
            // Write description pool.
            foreach (String description in descriptionPool)
            {
                objectOutput.writeUTF(description);
            }

            // Write entries.
            objectOutput.writeInt(numOfEntries);
            for (int i = 0; i < numOfEntries; i++)
            {
                writeExternalWord(objectOutput, prefixSizeInBytes, phoneNumberPrefixes, i);
                writeExternalWord(objectOutput, descIndexSizeInBytes, descriptionIndexes, i);
            }
        }
Esempio n. 2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
        internal void WriteExternal(ObjectOutput @out)
        {
            // HijrahChronology is implicit in the Hijrah_DATE_TYPE
            @out.WriteObject(Chronology);
            @out.WriteInt(get(YEAR));
            @out.WriteByte(get(MONTH_OF_YEAR));
            @out.WriteByte(get(DAY_OF_MONTH));
        }
Esempio n. 3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
        public override void WriteExternal(ObjectOutput @out)
        {
            @out.writeUTF(_role);
            @out.writeObject(_instanceId);
            @out.writeUTF(_clusterUri.ToString());
            @out.writeUTF(_roleUri.ToString());
            _storeId.writeExternal(@out);
        }
Esempio n. 4
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
        public override void WriteExternal(ObjectOutput @out)
        {
            @out.writeLong(_creationTime);
            @out.writeLong(_randomId);
            @out.writeLong(_storeVersion);
            @out.writeLong(_upgradeTime);
            @out.writeLong(_upgradeId);
        }
Esempio n. 5
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
        public override void WriteExternal(ObjectOutput @out)
        {
            @out.writeUTF(_role);
            @out.writeObject(_instanceId);
            if (_clusterUri != null)
            {
                @out.writeUTF(_clusterUri.ToString());
            }
        }
Esempio n. 6
0
            override public void writeExternal(ObjectOutput objectOutput)
            {
                int size = getMetadataCount();

                objectOutput.writeInt(size);
                for (int i = 0; i < size; i++)
                {
                    metadata_.get(i).writeExternal(objectOutput);
                }
            }
        public async Task <IOutput> Handle(EditGroupInput request, CancellationToken cancellationToken)
        {
            var item = await _context.Groups.FirstOrDefaultAsync(x => x.Id == request.Id, cancellationToken : cancellationToken);

            item.Name = request.Name;

            await _context.SaveChangesAsync(cancellationToken);

            return(ObjectOutput.CreateWithId(request.Id));
        }
Esempio n. 8
0
        public async Task <IOutput> Handle(CreateTeacherInput request, CancellationToken cancellationToken)
        {
            var teacher = new Entities.Teacher
            {
                Name = request.Name
            };

            _context.Teachers.Add(teacher);

            await _context.SaveChangesAsync(cancellationToken);

            return(ObjectOutput.CreateWithId(teacher.Id));
        }
        public async Task <IOutput> Handle(CreateSubjectInput request, CancellationToken cancellationToken)
        {
            var subject = new Entities.Subject
            {
                Name      = request.Name,
                TeacherId = request.TeacherId
            };

            _context.Subjects.Add(subject);

            await _context.SaveChangesAsync(cancellationToken);

            return(ObjectOutput.CreateWithId(subject.Id));
        }
Esempio n. 10
0
			public void Purge ()
			{
				HeightOutput ho = MapMagic.instance.gens.GetGenerator<HeightOutput>(); if (ho==null || !ho.enabled) HeightOutput.Purge(this);
				
				SplatOutput so = MapMagic.instance.gens.GetGenerator<SplatOutput>();
				PreviewOutput po = MapMagic.instance.gens.GetGenerator<PreviewOutput>();
				if ( (po == null || !po.enabled) && (so==null || !so.enabled) ) SplatOutput.Purge(this);
				if (po == null || !po.enabled) previewObjs = null;
				
				GrassOutput go = MapMagic.instance.gens.GetGenerator<GrassOutput>(); if (go==null || !go.enabled) GrassOutput.Purge(this);
				ObjectOutput oo = MapMagic.instance.gens.GetGenerator<ObjectOutput>(); if (oo==null || !oo.enabled) ObjectOutput.Purge(this);
				TreesOutput to = MapMagic.instance.gens.GetGenerator<TreesOutput>(); if (to==null || !to.enabled) TreesOutput.Purge(this);
				purge = false;
			}
Esempio n. 11
0
        /**
         * Writes the value read from the provided byte {@code buffer} at the specified {@code index} to
         * the provided {@code objectOutput}.
         *
         * @param objectOutput  the object output stream to which the value is written
         * @param wordSize  the number of bytes used to store the value
         * @param inputBuffer  the byte buffer from which the value is read
         * @param index  the index of the value in the the byte buffer
         * @throws IOException if an error occurred writing to the provided object output stream
         */
        private static void writeExternalWord(ObjectOutput objectOutput, int wordSize,
                                              ByteBuffer inputBuffer, int index)
        {
            int wordIndex = index * wordSize;

            if (wordSize == SHORT_NUM_BYTES)
            {
                objectOutput.writeShort(inputBuffer.getShort(wordIndex));
            }
            else
            {
                objectOutput.writeInt(inputBuffer.getInt(wordIndex));
            }
        }
Esempio n. 12
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: private static void writeInternal(byte type, Object object, java.io.ObjectOutput out) throws java.io.IOException
        private static void WriteInternal(sbyte type, Object @object, ObjectOutput @out)
        {
            @out.WriteByte(type);
            switch (type)
            {
            case CHRONO_TYPE:
                ((AbstractChronology)@object).WriteExternal(@out);
                break;

            case CHRONO_LOCAL_DATE_TIME_TYPE:
//JAVA TO C# CONVERTER TODO TASK: Java wildcard generics are not converted to .NET:
//ORIGINAL LINE: ((ChronoLocalDateTimeImpl<?>) object).writeExternal(out);
                ((ChronoLocalDateTimeImpl <?>)@object).WriteExternal(@out);
                break;

            case CHRONO_ZONE_DATE_TIME_TYPE:
//JAVA TO C# CONVERTER TODO TASK: Java wildcard generics are not converted to .NET:
//ORIGINAL LINE: ((ChronoZonedDateTimeImpl<?>) object).writeExternal(out);
                ((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");
            }
        }
 public void writeExternal(ObjectOutput objectOutput)
 {
     objectOutput.writeInt(numOfEntries);
     for (int i = 0; i < numOfEntries; i++)
     {
         objectOutput.writeInt(countryCallingCodes[i]);
         Set <String> setOfLangs = availableLanguages.get(i);
         int          numOfLangs = setOfLangs.size();
         objectOutput.writeInt(numOfLangs);
         foreach (String lang in setOfLangs)
         {
             objectOutput.writeUTF(lang);
         }
     }
 }
Esempio n. 14
0
        public void writeExternal(ObjectOutput objectOutput)
        {
            objectOutput.writeInt(numOfEntries);
            for (int i = 0; i < numOfEntries; i++)
            {
                objectOutput.writeInt(phoneNumberPrefixes[i]);
                objectOutput.writeUTF(descriptions[i]);
            }
            int sizeOfLengths = possibleLengths.size();

            objectOutput.writeInt(sizeOfLengths);
            foreach (Integer length in possibleLengths)
            {
                objectOutput.writeInt(length);
            }
        }
        public async Task <IOutput> Handle(UpdateSubjectInput request, CancellationToken cancellationToken)
        {
            var subject =
                await _context.Subjects.FirstOrDefaultAsync(x => x.Id == request.SubjectId, cancellationToken);

            if (subject is null)
            {
                return(ObjectOutput.CreateWithId(1));
            }

            subject.Name      = request.Name;
            subject.TeacherId = request.TeacherId;

            await _context.SaveChangesAsync(cancellationToken);

            return(ObjectOutput.CreateWithId(subject.Id));
        }
Esempio n. 16
0
        /// <summary>
        /// The object implements the writeExternal method to save its contents
        /// by calling the methods of DataOutput for its primitive values or
        /// calling the writeObject method of ObjectOutput for objects, strings
        /// and arrays. </summary>
        /// <exception cref="IOException"> Includes any I/O exceptions that may occur </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
        public virtual void WriteExternal(ObjectOutput @out)
        {
            String s = ToString();             // contains ASCII chars only

            // one-to-one correspondence between ASCII char and byte in UTF string
            if (s.Length() <= 65535)             // 65535 is max length of UTF string
            {
                @out.WriteUTF(s);
            }
            else
            {
                @out.WriteByte(0);
                @out.WriteByte(0);
                @out.WriteInt(s.Length());
                @out.Write(s.Bytes);
            }
        }
Esempio n. 17
0
            override public void writeExternal(ObjectOutput objectOutput)
            {
                objectOutput.writeBoolean(_hasNationalNumberPattern);
                if (_hasNationalNumberPattern)
                {
                    objectOutput.writeUTF(nationalNumberPattern_);
                }

                objectOutput.writeBoolean(_hasPossibleNumberPattern);
                if (_hasPossibleNumberPattern)
                {
                    objectOutput.writeUTF(possibleNumberPattern_);
                }

                objectOutput.writeBoolean(_hasExampleNumber);
                if (_hasExampleNumber)
                {
                    objectOutput.writeUTF(exampleNumber_);
                }
            }
        public async Task <IOutput> Handle(CreateGroupInput request, CancellationToken cancellationToken)
        {
            using var unit = _unitOfWork.CreateUnitOfWork();

            var exist = await _context.Groups.AnyAsync(x => x.Name == request.Name, cancellationToken);

            if (exist)
            {
                return(Failure("Такая группа уже существует"));
            }

            var group = new Entities.Group(request.Name);

            _context.Groups.Add(group);

            await _context.SaveChangesAsync(cancellationToken);

            await unit.Apply();

            return(ObjectOutput.CreateWithId(group.Id));
        }
        public async Task <IOutput> Handle(CreateScheduleInput request, CancellationToken cancellationToken)
        {
            var group = await _context.Groups
                        .Include(x => x.GroupSubjects)
                        .FirstOrDefaultAsync(x => x.Id == request.GroupId, cancellationToken);

            if (group is null)
            {
                return(Failure("Группа не найдена"));
            }

            var subject = await _context.Subjects
                          .FirstOrDefaultAsync(x => x.Id == request.SubjectId, cancellationToken);

            if (subject is null)
            {
                return(Failure("Предмет не найден"));
            }

            var groupSubject = new GroupSubject
            {
                DurationInMinutes = request.DurationInMinutes,
                StartDate         = request.StartDate,

                Group   = group,
                GroupId = group.Id,

                Subject   = subject,
                SubjectId = subject.Id,

                ManualCreated = true,
            };

            _context.GroupSubjects.Add(groupSubject);

            await _context.SaveChangesAsync(cancellationToken);

            return(ObjectOutput.CreateWithId(groupSubject.Id));
        }
Esempio n. 20
0
            override public void writeExternal(ObjectOutput objectOutput)
            {
                objectOutput.writeUTF(pattern_);
                objectOutput.writeUTF(format_);
                int _leadingDigitsPatternSize = leadingDigitsPatternSize();

                objectOutput.writeInt(_leadingDigitsPatternSize);
                for (int i = 0; i < _leadingDigitsPatternSize; i++)
                {
                    objectOutput.writeUTF(leadingDigitsPattern_.get(i));
                }

                objectOutput.writeBoolean(_hasNationalPrefixFormattingRule);
                if (_hasNationalPrefixFormattingRule)
                {
                    objectOutput.writeUTF(nationalPrefixFormattingRule_);
                }
                objectOutput.writeBoolean(_hasDomesticCarrierCodeFormattingRule);
                if (_hasDomesticCarrierCodeFormattingRule)
                {
                    objectOutput.writeUTF(domesticCarrierCodeFormattingRule_);
                }
                objectOutput.writeBoolean(nationalPrefixOptionalWhenFormatting_);
            }
Esempio n. 21
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
        public override void WriteExternal(ObjectOutput @out)
        {
            @out.writeInt(_serverId);
            @out.writeLong(_latestTxId);
            @out.writeBoolean(_currentWinner);
        }
Esempio n. 22
0
            override public void writeExternal(ObjectOutput objectOutput)
            {
                objectOutput.writeBoolean(_hasGeneralDesc);
                if (_hasGeneralDesc)
                {
                    generalDesc_.writeExternal(objectOutput);
                }
                objectOutput.writeBoolean(_hasFixedLine);
                if (_hasFixedLine)
                {
                    fixedLine_.writeExternal(objectOutput);
                }
                objectOutput.writeBoolean(_hasMobile);
                if (_hasMobile)
                {
                    mobile_.writeExternal(objectOutput);
                }
                objectOutput.writeBoolean(_hasTollFree);
                if (_hasTollFree)
                {
                    tollFree_.writeExternal(objectOutput);
                }
                objectOutput.writeBoolean(_hasPremiumRate);
                if (_hasPremiumRate)
                {
                    premiumRate_.writeExternal(objectOutput);
                }
                objectOutput.writeBoolean(_hasSharedCost);
                if (_hasSharedCost)
                {
                    sharedCost_.writeExternal(objectOutput);
                }
                objectOutput.writeBoolean(_hasPersonalNumber);
                if (_hasPersonalNumber)
                {
                    personalNumber_.writeExternal(objectOutput);
                }
                objectOutput.writeBoolean(_hasVoip);
                if (_hasVoip)
                {
                    voip_.writeExternal(objectOutput);
                }
                objectOutput.writeBoolean(_hasPager);
                if (_hasPager)
                {
                    pager_.writeExternal(objectOutput);
                }
                objectOutput.writeBoolean(_hasUan);
                if (_hasUan)
                {
                    uan_.writeExternal(objectOutput);
                }
                objectOutput.writeBoolean(_hasEmergency);
                if (_hasEmergency)
                {
                    emergency_.writeExternal(objectOutput);
                }
                objectOutput.writeBoolean(_hasVoicemail);
                if (_hasVoicemail)
                {
                    voicemail_.writeExternal(objectOutput);
                }
                objectOutput.writeBoolean(_hasShortCode);
                if (_hasShortCode)
                {
                    shortCode_.writeExternal(objectOutput);
                }
                objectOutput.writeBoolean(_hasStandardRate);
                if (_hasStandardRate)
                {
                    standardRate_.writeExternal(objectOutput);
                }
                objectOutput.writeBoolean(_hasCarrierSpecific);
                if (_hasCarrierSpecific)
                {
                    carrierSpecific_.writeExternal(objectOutput);
                }
                objectOutput.writeBoolean(_hasNoInternationalDialling);
                if (_hasNoInternationalDialling)
                {
                    noInternationalDialling_.writeExternal(objectOutput);
                }

                objectOutput.writeUTF(id_);
                objectOutput.writeInt(countryCode_);
                objectOutput.writeUTF(internationalPrefix_);

                objectOutput.writeBoolean(_hasPreferredInternationalPrefix);
                if (_hasPreferredInternationalPrefix)
                {
                    objectOutput.writeUTF(preferredInternationalPrefix_);
                }

                objectOutput.writeBoolean(_hasNationalPrefix);
                if (_hasNationalPrefix)
                {
                    objectOutput.writeUTF(nationalPrefix_);
                }

                objectOutput.writeBoolean(_hasPreferredExtnPrefix);
                if (_hasPreferredExtnPrefix)
                {
                    objectOutput.writeUTF(preferredExtnPrefix_);
                }

                objectOutput.writeBoolean(_hasNationalPrefixForParsing);
                if (_hasNationalPrefixForParsing)
                {
                    objectOutput.writeUTF(nationalPrefixForParsing_);
                }

                objectOutput.writeBoolean(_hasNationalPrefixTransformRule);
                if (_hasNationalPrefixTransformRule)
                {
                    objectOutput.writeUTF(nationalPrefixTransformRule_);
                }

                objectOutput.writeBoolean(sameMobileAndFixedLinePattern_);

                int _numberFormatSize = numberFormatSize();

                objectOutput.writeInt(_numberFormatSize);
                for (int i = 0; i < _numberFormatSize; i++)
                {
                    numberFormat_.get(i).writeExternal(objectOutput);
                }

                int _intlNumberFormatSize = intlNumberFormatSize();

                objectOutput.writeInt(_intlNumberFormatSize);
                for (int i = 0; i < _intlNumberFormatSize; i++)
                {
                    intlNumberFormat_.get(i).writeExternal(objectOutput);
                }

                objectOutput.writeBoolean(mainCountryForCode_);

                objectOutput.writeBoolean(_hasLeadingDigits);
                if (_hasLeadingDigits)
                {
                    objectOutput.writeUTF(leadingDigits_);
                }

                objectOutput.writeBoolean(leadingZeroPossible_);
            }
            public override void writeExternal(ObjectOutput objectOutput)
            {
                objectOutput.writeBoolean(_hasNationalNumberPattern);
                  if (_hasNationalNumberPattern) {
                objectOutput.writeUTF(nationalNumberPattern_);
                  }

                  objectOutput.writeBoolean(_hasPossibleNumberPattern);
                  if (_hasPossibleNumberPattern) {
                objectOutput.writeUTF(possibleNumberPattern_);
                  }

                  objectOutput.writeBoolean(_hasExampleNumber);
                  if (_hasExampleNumber) {
                objectOutput.writeUTF(exampleNumber_);
                  }
            }
Esempio n. 24
0
 public void write(ObjectOutput arg0)
 {
     Instance.CallMethod("write", "(Ljava/io/ObjectOutput;)V", arg0);
 }
 /**
    * Supports Java Serialization.
    */
 public override void writeExternal(ObjectOutput objectOutput)
 {
     objectOutput.writeInt(numOfEntries);
     for (int i = 0; i < numOfEntries; i++) {
       objectOutput.writeInt(countryCallingCodes[i]);
       Set<String> setOfLangs = availableLanguages.get(i);
       int numOfLangs = setOfLangs.size();
       objectOutput.writeInt(numOfLangs);
       foreach (String lang in setOfLangs) {
     objectOutput.writeUTF(lang);
       }
     }
 }
   /**
      * Writes the value read from the provided byte {@code buffer} at the specified {@code index} to
      * the provided {@code objectOutput}.
      *
      * @param objectOutput  the object output stream to which the value is written
      * @param wordSize  the number of bytes used to store the value
      * @param inputBuffer  the byte buffer from which the value is read
      * @param index  the index of the value in the the byte buffer
      * @throws IOException if an error occurred writing to the provided object output stream
      */
   private static void writeExternalWord(ObjectOutput objectOutput, int wordSize,
 ByteBuffer inputBuffer, int index)
   {
       int wordIndex = index * wordSize;
       if (wordSize == SHORT_NUM_BYTES) {
         objectOutput.writeShort(inputBuffer.getShort(wordIndex));
       } else {
         objectOutput.writeInt(inputBuffer.getInt(wordIndex));
       }
   }
Esempio n. 27
0
 public void Add(ObjectOutput value)
 {
 }
Esempio n. 28
0
			public ObjectOutputStream (ObjectOutput stream) {
				_javaObjectOutput = stream;
			}
 //@Deprecated
 public abstract void write(ObjectOutput @out);
Esempio n. 30
0
 public void SetDataOutput(ObjectOutput dataOutput_0)
 {
     this.dataOutput = dataOutput_0;
 }
            public override void writeExternal(ObjectOutput objectOutput)
            {
                objectOutput.writeBoolean(_hasGeneralDesc);
                  if (_hasGeneralDesc) {
                generalDesc_.writeExternal(objectOutput);
                  }
                  objectOutput.writeBoolean(_hasFixedLine);
                  if (_hasFixedLine) {
                fixedLine_.writeExternal(objectOutput);
                  }
                  objectOutput.writeBoolean(_hasMobile);
                  if (_hasMobile) {
                mobile_.writeExternal(objectOutput);
                  }
                  objectOutput.writeBoolean(_hasTollFree);
                  if (_hasTollFree) {
                tollFree_.writeExternal(objectOutput);
                  }
                  objectOutput.writeBoolean(_hasPremiumRate);
                  if (_hasPremiumRate) {
                premiumRate_.writeExternal(objectOutput);
                  }
                  objectOutput.writeBoolean(_hasSharedCost);
                  if (_hasSharedCost) {
                sharedCost_.writeExternal(objectOutput);
                  }
                  objectOutput.writeBoolean(_hasPersonalNumber);
                  if (_hasPersonalNumber) {
                personalNumber_.writeExternal(objectOutput);
                  }
                  objectOutput.writeBoolean(_hasVoip);
                  if (_hasVoip) {
                voip_.writeExternal(objectOutput);
                  }
                  objectOutput.writeBoolean(_hasPager);
                  if (_hasPager) {
                pager_.writeExternal(objectOutput);
                  }
                  objectOutput.writeBoolean(_hasUan);
                  if (_hasUan) {
                uan_.writeExternal(objectOutput);
                  }
                  objectOutput.writeBoolean(_hasEmergency);
                  if (_hasEmergency) {
                emergency_.writeExternal(objectOutput);
                  }
                  objectOutput.writeBoolean(_hasVoicemail);
                  if (_hasVoicemail) {
                voicemail_.writeExternal(objectOutput);
                  }
                  objectOutput.writeBoolean(_hasShortCode);
                  if (_hasShortCode) {
                shortCode_.writeExternal(objectOutput);
                  }
                  objectOutput.writeBoolean(_hasStandardRate);
                  if (_hasStandardRate) {
                standardRate_.writeExternal(objectOutput);
                  }
                  objectOutput.writeBoolean(_hasCarrierSpecific);
                  if (_hasCarrierSpecific) {
                carrierSpecific_.writeExternal(objectOutput);
                  }
                  objectOutput.writeBoolean(_hasNoInternationalDialling);
                  if (_hasNoInternationalDialling) {
                noInternationalDialling_.writeExternal(objectOutput);
                  }

                  objectOutput.writeUTF(id_);
                  objectOutput.writeInt(countryCode_);
                  objectOutput.writeUTF(internationalPrefix_);

                  objectOutput.writeBoolean(_hasPreferredInternationalPrefix);
                  if (_hasPreferredInternationalPrefix) {
                objectOutput.writeUTF(preferredInternationalPrefix_);
                  }

                  objectOutput.writeBoolean(_hasNationalPrefix);
                  if (_hasNationalPrefix) {
                objectOutput.writeUTF(nationalPrefix_);
                  }

                  objectOutput.writeBoolean(_hasPreferredExtnPrefix);
                  if (_hasPreferredExtnPrefix) {
                objectOutput.writeUTF(preferredExtnPrefix_);
                  }

                  objectOutput.writeBoolean(_hasNationalPrefixForParsing);
                  if (_hasNationalPrefixForParsing) {
                objectOutput.writeUTF(nationalPrefixForParsing_);
                  }

                  objectOutput.writeBoolean(_hasNationalPrefixTransformRule);
                  if (_hasNationalPrefixTransformRule) {
                objectOutput.writeUTF(nationalPrefixTransformRule_);
                  }

                  objectOutput.writeBoolean(sameMobileAndFixedLinePattern_);

                  int _numberFormatSize = numberFormatSize();
                  objectOutput.writeInt(_numberFormatSize);
                  for (int i = 0; i < _numberFormatSize; i++) {
                numberFormat_.get(i).writeExternal(objectOutput);
                  }

                  int _intlNumberFormatSize = intlNumberFormatSize();
                  objectOutput.writeInt(_intlNumberFormatSize);
                  for (int i = 0; i < _intlNumberFormatSize; i++) {
                intlNumberFormat_.get(i).writeExternal(objectOutput);
                  }

                  objectOutput.writeBoolean(mainCountryForCode_);

                  objectOutput.writeBoolean(_hasLeadingDigits);
                  if (_hasLeadingDigits) {
                objectOutput.writeUTF(leadingDigits_);
                  }

                  objectOutput.writeBoolean(leadingZeroPossible_);
            }
        public override void writeExternal(ObjectOutput objectOutput)
        {
            // Write binary words sizes.
            objectOutput.writeInt(prefixSizeInBytes);
            objectOutput.writeInt(descIndexSizeInBytes);

            // Write possible lengths.
            int sizeOfLengths = possibleLengths.size();
            objectOutput.writeInt(sizeOfLengths);
            foreach (Integer length in possibleLengths) {
              objectOutput.writeInt(length);
            }

            // Write description pool size.
            objectOutput.writeInt(descriptionPool.Length);
            // Write description pool.
            foreach (String description in descriptionPool) {
              objectOutput.writeUTF(description);
            }

            // Write entries.
            objectOutput.writeInt(numOfEntries);
            for (int i = 0; i < numOfEntries; i++) {
              writeExternalWord(objectOutput, prefixSizeInBytes, phoneNumberPrefixes, i);
              writeExternalWord(objectOutput, descIndexSizeInBytes, descriptionIndexes, i);
            }
        }
Esempio n. 33
0
		/// <summary>
		/// Serializes this <code>DataFlavor</code>.
		/// </summary>
		public void writeExternal(ObjectOutput @os)
		{
		}
            public override void writeExternal(ObjectOutput objectOutput)
            {
                objectOutput.writeUTF(pattern_);
                  objectOutput.writeUTF(format_);
                  int _leadingDigitsPatternSize = leadingDigitsPatternSize();
                  objectOutput.writeInt(_leadingDigitsPatternSize);
                  for (int i = 0; i < _leadingDigitsPatternSize; i++) {
                objectOutput.writeUTF(leadingDigitsPattern_.get(i));
                  }

                  objectOutput.writeBoolean(_hasNationalPrefixFormattingRule);
                  if (_hasNationalPrefixFormattingRule) {
                objectOutput.writeUTF(nationalPrefixFormattingRule_);
                  }
                  objectOutput.writeBoolean(_hasDomesticCarrierCodeFormattingRule);
                  if (_hasDomesticCarrierCodeFormattingRule) {
                objectOutput.writeUTF(domesticCarrierCodeFormattingRule_);
                  }
                  objectOutput.writeBoolean(nationalPrefixOptionalWhenFormatting_);
            }
 public void Add(ObjectOutput value)
 {
     if (value == null) throw new ArgumentNullException("value");
     Properties[CurrentProperty] = value;
 }
 public override void writeExternal(ObjectOutput objectOutput)
 {
     objectOutput.writeInt(numOfEntries);
     for (int i = 0; i < numOfEntries; i++) {
       objectOutput.writeInt(phoneNumberPrefixes[i]);
       objectOutput.writeUTF(descriptions[i]);
     }
     int sizeOfLengths = possibleLengths.size();
     objectOutput.writeInt(sizeOfLengths);
     foreach (Integer length in possibleLengths) {
       objectOutput.writeInt(length);
     }
 }
Esempio n. 37
0
 public DataOutputCompressor(ObjectOutput dataOutput_0)
 {
     this.dataOutput = dataOutput_0;
 }
Esempio n. 38
0
 public override void WriteExternal(ObjectOutput @out)
 {
 }
 public override void writeExternal(ObjectOutput objectOutput)
 {
     int size = getMetadataCount();
       objectOutput.writeInt(size);
       for (int i = 0; i < size; i++) {
     metadata_.get(i).writeExternal(objectOutput);
       }
 }
Esempio n. 40
0
 public ObjectOutputStream(ObjectOutput stream)
 {
     _javaObjectOutput = stream;
 }
Esempio n. 41
0
        /// <summary>
        /// Marshals a binary representation of this <code>ObjID</code> to
        /// an <code>ObjectOutput</code> instance.
        ///
        /// <para>Specifically, this method first invokes the given stream's
        /// <seealso cref="ObjectOutput#writeLong(long)"/> method with this object
        /// identifier's object number, and then it writes its address
        /// space identifier by invoking its <seealso cref="UID#write(DataOutput)"/>
        /// method with the stream.
        ///
        /// </para>
        /// </summary>
        /// <param name="out"> the <code>ObjectOutput</code> instance to write
        /// this <code>ObjID</code> to
        /// </param>
        /// <exception cref="IOException"> if an I/O error occurs while performing
        /// this operation </exception>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: public void write(java.io.ObjectOutput out) throws java.io.IOException
        public void Write(ObjectOutput @out)
        {
            @out.WriteLong(ObjNum);
            Space.Write(@out);
        }
 public void Add(ObjectOutput value)
 {
     Items.Add(value);
 }
Esempio n. 43
0
        //-----------------------------------------------------------------------
        /// <summary>
        /// Implements the {@code Externalizable} interface to write the object.
        /// @serialData
        /// Each serializable class is mapped to a type that is the first byte
        /// in the stream.  Refer to each class {@code writeReplace}
        /// serialized form for the value of the type and sequence of values for the type.
        /// <ul>
        /// <li><a href="../../../serialized-form.html#java.time.chrono.HijrahChronology">HijrahChronology.writeReplace</a>
        /// <li><a href="../../../serialized-form.html#java.time.chrono.IsoChronology">IsoChronology.writeReplace</a>
        /// <li><a href="../../../serialized-form.html#java.time.chrono.JapaneseChronology">JapaneseChronology.writeReplace</a>
        /// <li><a href="../../../serialized-form.html#java.time.chrono.MinguoChronology">MinguoChronology.writeReplace</a>
        /// <li><a href="../../../serialized-form.html#java.time.chrono.ThaiBuddhistChronology">ThaiBuddhistChronology.writeReplace</a>
        /// <li><a href="../../../serialized-form.html#java.time.chrono.ChronoLocalDateTimeImpl">ChronoLocalDateTime.writeReplace</a>
        /// <li><a href="../../../serialized-form.html#java.time.chrono.ChronoZonedDateTimeImpl">ChronoZonedDateTime.writeReplace</a>
        /// <li><a href="../../../serialized-form.html#java.time.chrono.JapaneseDate">JapaneseDate.writeReplace</a>
        /// <li><a href="../../../serialized-form.html#java.time.chrono.JapaneseEra">JapaneseEra.writeReplace</a>
        /// <li><a href="../../../serialized-form.html#java.time.chrono.HijrahDate">HijrahDate.writeReplace</a>
        /// <li><a href="../../../serialized-form.html#java.time.chrono.MinguoDate">MinguoDate.writeReplace</a>
        /// <li><a href="../../../serialized-form.html#java.time.chrono.ThaiBuddhistDate">ThaiBuddhistDate.writeReplace</a>
        /// </ul>
        /// </summary>
        /// <param name="out">  the data stream to write to, not null </param>
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
//ORIGINAL LINE: @Override public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
        public void WriteExternal(ObjectOutput @out)
        {
            WriteInternal(Type, @object, @out);
        }
 /**
    * Supports Java Serialization.
    */
 public override void writeExternal(ObjectOutput objectOutput)
 {
     objectOutput.writeBoolean(areaCodeMapStorage is FlyweightMapStorage);
     areaCodeMapStorage.writeExternal(objectOutput);
 }
Esempio n. 45
0
 /// <summary>
 /// Serializes this <code>DataFlavor</code>.
 /// </summary>
 public void writeExternal(ObjectOutput @os)
 {
 }
Esempio n. 46
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
        public override void WriteExternal(ObjectOutput @out)
        {
            // NOTE: This was changed from writing only a byte in 2.2, which doesn't work
            @out.writeInt(_len);
            @out.write(_buf, 0, _len);
        }