3232 * Test for the SwappedDataInputStream. This also
3333 * effectively tests the underlying EndianUtils Stream methods.
3434 */
35-
3635public class SwappedDataInputStreamTest {
3736
3837 private SwappedDataInputStream sdis ;
@@ -68,10 +67,8 @@ public void testCloseHandleIOException() throws IOException {
6867 @ Test
6968 public void testReadBoolean () throws IOException {
7069 bytes = new byte [] { 0x00 , 0x01 , 0x02 , };
71- try (
72- final ByteArrayInputStream bais = new ByteArrayInputStream (bytes );
73- final SwappedDataInputStream sdis = new SwappedDataInputStream (bais )
74- ) {
70+ try (final ByteArrayInputStream bais = new ByteArrayInputStream (bytes );
71+ final SwappedDataInputStream sdis = new SwappedDataInputStream (bais )) {
7572 assertFalse (sdis .readBoolean ());
7673 assertTrue (sdis .readBoolean ());
7774 assertTrue (sdis .readBoolean ());
@@ -80,22 +77,22 @@ public void testReadBoolean() throws IOException {
8077
8178 @ Test
8279 public void testReadByte () throws IOException {
83- assertEquals ( 0x01 , this .sdis .readByte () );
80+ assertEquals (0x01 , this .sdis .readByte ());
8481 }
8582
8683 @ Test
8784 public void testReadChar () throws IOException {
88- assertEquals ( (char ) 0x0201 , this .sdis .readChar () );
85+ assertEquals ((char ) 0x0201 , this .sdis .readChar ());
8986 }
9087
9188 @ Test
9289 public void testReadDouble () throws IOException {
93- assertEquals ( Double .longBitsToDouble (0x0807060504030201L ), this .sdis .readDouble (), 0 );
90+ assertEquals (Double .longBitsToDouble (0x0807060504030201L ), this .sdis .readDouble (), 0 );
9491 }
9592
9693 @ Test
9794 public void testReadFloat () throws IOException {
98- assertEquals ( Float .intBitsToFloat (0x04030201 ), this .sdis .readFloat (), 0 );
95+ assertEquals (Float .intBitsToFloat (0x04030201 ), this .sdis .readFloat (), 0 );
9996 }
10097
10198 @ Test
@@ -109,7 +106,7 @@ public void testReadFully() throws IOException {
109106
110107 @ Test
111108 public void testReadInt () throws IOException {
112- assertEquals ( 0x04030201 , this .sdis .readInt () );
109+ assertEquals (0x04030201 , this .sdis .readInt ());
113110 }
114111
115112 @ Test
@@ -119,22 +116,22 @@ public void testReadLine() {
119116
120117 @ Test
121118 public void testReadLong () throws IOException {
122- assertEquals ( 0x0807060504030201L , this .sdis .readLong () );
119+ assertEquals (0x0807060504030201L , this .sdis .readLong ());
123120 }
124121
125122 @ Test
126123 public void testReadShort () throws IOException {
127- assertEquals ( (short ) 0x0201 , this .sdis .readShort () );
124+ assertEquals ((short ) 0x0201 , this .sdis .readShort ());
128125 }
129126
130127 @ Test
131128 public void testReadUnsignedByte () throws IOException {
132- assertEquals ( 0x01 , this .sdis .readUnsignedByte () );
129+ assertEquals (0x01 , this .sdis .readUnsignedByte ());
133130 }
134131
135132 @ Test
136133 public void testReadUnsignedShort () throws IOException {
137- assertEquals ( (short ) 0x0201 , this .sdis .readUnsignedShort () );
134+ assertEquals ((short ) 0x0201 , this .sdis .readUnsignedShort ());
138135 }
139136
140137 @ Test
@@ -145,7 +142,7 @@ public void testReadUTF() {
145142 @ Test
146143 public void testSkipBytes () throws IOException {
147144 this .sdis .skipBytes (4 );
148- assertEquals ( 0x08070605 , this .sdis .readInt () );
145+ assertEquals (0x08070605 , this .sdis .readInt ());
149146 }
150147
151148}
0 commit comments