16
16
17
17
package com .igormaznitsa .jbbp .io ;
18
18
19
+ import static com .igormaznitsa .jbbp .utils .JBBPUtils .assertNotNull ;
20
+
19
21
import com .igormaznitsa .jbbp .exceptions .JBBPIOException ;
20
22
import com .igormaznitsa .jbbp .mapper .Bin ;
21
23
import com .igormaznitsa .jbbp .mapper .BinFieldFilter ;
@@ -81,9 +83,9 @@ public class JBBPOut extends AbstractMappedClassFieldObserver {
81
83
*/
82
84
private JBBPOut (final OutputStream outStream , final JBBPByteOrder byteOrder ,
83
85
final JBBPBitOrder bitOrder ) {
84
- JBBPUtils . assertNotNull (outStream , "Out stream must not be null" );
85
- JBBPUtils . assertNotNull (byteOrder , "Byte order must not be null" );
86
- JBBPUtils . assertNotNull (bitOrder , "Bit order must not be null" );
86
+ assertNotNull (outStream , "Out stream must not be null" );
87
+ assertNotNull (byteOrder , "Byte order must not be null" );
88
+ assertNotNull (bitOrder , "Bit order must not be null" );
87
89
88
90
this .outStream = outStream instanceof JBBPBitOutputStream ? (JBBPBitOutputStream ) outStream :
89
91
new JBBPBitOutputStream (outStream , bitOrder );
@@ -190,7 +192,7 @@ public static JBBPOut BeginBin(final JBBPBitOrder bitOrder) {
190
192
* @param array an object to be checked for null.
191
193
*/
192
194
private static void assertArrayNotNull (final Object array ) {
193
- JBBPUtils . assertNotNull (array , "Array must not be null" );
195
+ assertNotNull (array , "Array must not be null" );
194
196
}
195
197
196
198
/**
@@ -199,7 +201,7 @@ private static void assertArrayNotNull(final Object array) {
199
201
* @param str an object to be checked for null.
200
202
*/
201
203
private static void assertStringNotNull (final String str ) {
202
- JBBPUtils . assertNotNull (str , "String must not be null" );
204
+ assertNotNull (str , "String must not be null" );
203
205
}
204
206
205
207
/**
@@ -269,7 +271,7 @@ public JBBPOut Skip(int numberOfBytes) throws IOException {
269
271
*/
270
272
public JBBPOut ByteOrder (final JBBPByteOrder value ) {
271
273
assertNotEnded ();
272
- JBBPUtils . assertNotNull (value , "Byte order must not be null" );
274
+ assertNotNull (value , "Byte order must not be null" );
273
275
if (this .processCommands ) {
274
276
this .byteOrder = value ;
275
277
}
@@ -386,7 +388,7 @@ private void _writeBits(final JBBPBitNumber numberOfBits, final int value) throw
386
388
*/
387
389
public JBBPOut Bits (final JBBPBitNumber numberOfBits , final int value ) throws IOException {
388
390
assertNotEnded ();
389
- JBBPUtils . assertNotNull (numberOfBits , "Number of bits must not be null" );
391
+ assertNotNull (numberOfBits , "Number of bits must not be null" );
390
392
if (this .processCommands ) {
391
393
_writeBits (numberOfBits , value );
392
394
}
@@ -404,7 +406,7 @@ public JBBPOut Bits(final JBBPBitNumber numberOfBits, final int value) throws IO
404
406
*/
405
407
public JBBPOut Bits (final JBBPBitNumber numberOfBits , final int ... value ) throws IOException {
406
408
assertNotEnded ();
407
- JBBPUtils . assertNotNull (value , "Array must not be null" );
409
+ assertNotNull (value , "Array must not be null" );
408
410
if (this .processCommands ) {
409
411
for (final int v : value ) {
410
412
_writeBits (numberOfBits , v );
@@ -424,7 +426,7 @@ public JBBPOut Bits(final JBBPBitNumber numberOfBits, final int... value) throws
424
426
*/
425
427
public JBBPOut Bits (final JBBPBitNumber numberOfBits , final byte [] value ) throws IOException {
426
428
assertNotEnded ();
427
- JBBPUtils . assertNotNull (value , "Array must not be null" );
429
+ assertNotNull (value , "Array must not be null" );
428
430
if (this .processCommands ) {
429
431
for (final byte b : value ) {
430
432
_writeBits (numberOfBits , b );
@@ -958,7 +960,7 @@ public JBBPOut Long(final long... value) throws IOException {
958
960
*/
959
961
public JBBPOut Var (final JBBPOutVarProcessor processor , final Object ... args ) throws IOException {
960
962
assertNotEnded ();
961
- JBBPUtils . assertNotNull (processor , "Var processor must not be null" );
963
+ assertNotNull (processor , "Var processor must not be null" );
962
964
if (this .processCommands ) {
963
965
this .processCommands = processor .processVarOut (this , this .outStream , args );
964
966
}
0 commit comments