@@ -465,7 +465,7 @@ public final void writeFieldId(long id) throws IOException {
465
465
if (!_cborContext .writeFieldId (id )) {
466
466
_reportError ("Can not write a field id, expecting a value" );
467
467
}
468
- _writeNumberNoCheck (id );
468
+ _writeLongNoCheck (id );
469
469
}
470
470
471
471
/*
@@ -593,7 +593,7 @@ public void writeArray(int[] array, int offset, int length) throws IOException
593
593
_verifyValueWrite ("write int array" );
594
594
_writeLengthMarker (PREFIX_TYPE_ARRAY , length );
595
595
for (int i = offset , end = offset +length ; i < end ; ++i ) {
596
- _writeNumberNoCheck (array [i ]);
596
+ _writeIntNoCheck (array [i ]);
597
597
}
598
598
}
599
599
@@ -605,7 +605,7 @@ public void writeArray(long[] array, int offset, int length) throws IOException
605
605
_verifyValueWrite ("write int array" );
606
606
_writeLengthMarker (PREFIX_TYPE_ARRAY , length );
607
607
for (int i = offset , end = offset +length ; i < end ; ++i ) {
608
- _writeNumberNoCheck (array [i ]);
608
+ _writeLongNoCheck (array [i ]);
609
609
}
610
610
}
611
611
@@ -617,7 +617,7 @@ public void writeArray(double[] array, int offset, int length) throws IOExceptio
617
617
_verifyValueWrite ("write int array" );
618
618
_writeLengthMarker (PREFIX_TYPE_ARRAY , length );
619
619
for (int i = offset , end = offset +length ; i < end ; ++i ) {
620
- _writeNumberNoCheck (array [i ]);
620
+ _writeDoubleNoCheck (array [i ]);
621
621
}
622
622
}
623
623
@@ -629,7 +629,7 @@ private final void _pushRemainingElements() {
629
629
_elementCounts [_elementCountsPtr ++] = _currentRemainingElements ;
630
630
}
631
631
632
- private final void _writeNumberNoCheck (int i ) throws IOException {
632
+ private final void _writeIntNoCheck (int i ) throws IOException {
633
633
int marker ;
634
634
if (i < 0 ) {
635
635
i = -i - 1 ;
@@ -671,10 +671,10 @@ private final void _writeNumberNoCheck(int i) throws IOException {
671
671
_outputBuffer [_outputTail ++] = b0 ;
672
672
}
673
673
674
- private final void _writeNumberNoCheck (long l ) throws IOException {
674
+ private final void _writeLongNoCheck (long l ) throws IOException {
675
675
if (_cfgMinimalInts ) {
676
676
if (l <= MAX_INT_AS_LONG && l >= MIN_INT_AS_LONG ) {
677
- _writeNumberNoCheck ((int ) l );
677
+ _writeIntNoCheck ((int ) l );
678
678
return ;
679
679
}
680
680
}
@@ -698,7 +698,7 @@ private final void _writeNumberNoCheck(long l) throws IOException {
698
698
_outputBuffer [_outputTail ++] = (byte ) i ;
699
699
}
700
700
701
- private final void _writeNumberNoCheck (double d ) throws IOException {
701
+ private final void _writeDoubleNoCheck (double d ) throws IOException {
702
702
_ensureRoomForOutput (11 );
703
703
// 17-Apr-2010, tatu: could also use 'doubleToIntBits', but it seems
704
704
// more accurate to use exact representation; and possibly faster.
0 commit comments