@@ -43,7 +43,7 @@ public class UnixLineEndingInputStream extends InputStream {
4343 * @param in The input stream to wrap
4444 * @param ensureLineFeedAtEndOfFile true to ensure that the file ends with LF
4545 */
46- public UnixLineEndingInputStream ( final InputStream in , final boolean ensureLineFeedAtEndOfFile ) {
46+ public UnixLineEndingInputStream (final InputStream in , final boolean ensureLineFeedAtEndOfFile ) {
4747 this .target = in ;
4848 this .ensureLineFeedAtEndOfFile = ensureLineFeedAtEndOfFile ;
4949 }
@@ -56,7 +56,7 @@ public UnixLineEndingInputStream( final InputStream in, final boolean ensureLine
5656 private int readWithUpdate () throws IOException {
5757 final int target = this .target .read ();
5858 eofSeen = target == -1 ;
59- if ( eofSeen ) {
59+ if (eofSeen ) {
6060 return target ;
6161 }
6262 slashNSeen = target == '\n' ;
@@ -70,19 +70,18 @@ private int readWithUpdate() throws IOException {
7070 @ Override
7171 public int read () throws IOException {
7272 final boolean previousWasSlashR = slashRSeen ;
73- if ( eofSeen ) {
73+ if (eofSeen ) {
7474 return eofGame (previousWasSlashR );
7575 }
7676 final int target = readWithUpdate ();
77- if ( eofSeen ) {
77+ if (eofSeen ) {
7878 return eofGame (previousWasSlashR );
7979 }
80- if (slashRSeen )
81- {
80+ if (slashRSeen ) {
8281 return '\n' ;
8382 }
8483
85- if ( previousWasSlashR && slashNSeen ){
84+ if (previousWasSlashR && slashNSeen ) {
8685 return read ();
8786 }
8887
@@ -95,10 +94,10 @@ public int read() throws IOException {
9594 * @return The next char to output to the stream
9695 */
9796 private int eofGame (final boolean previousWasSlashR ) {
98- if ( previousWasSlashR || !ensureLineFeedAtEndOfFile ) {
97+ if (previousWasSlashR || !ensureLineFeedAtEndOfFile ) {
9998 return -1 ;
10099 }
101- if ( !slashNSeen ) {
100+ if (!slashNSeen ) {
102101 slashNSeen = true ;
103102 return '\n' ;
104103 }
@@ -119,7 +118,7 @@ public void close() throws IOException {
119118 * {@inheritDoc}
120119 */
121120 @ Override
122- public synchronized void mark ( final int readlimit ) {
123- throw new UnsupportedOperationException ( "Mark notsupported" );
121+ public synchronized void mark (final int readlimit ) {
122+ throw new UnsupportedOperationException ("Mark notsupported" );
124123 }
125124}
0 commit comments