Skip to content

Commit 6f82a45

Browse files
author
Gary Gregory
committed
Formatting.
1 parent f17997c commit 6f82a45

2 files changed

Lines changed: 11 additions & 12 deletions

File tree

src/main/java/org/apache/commons/io/input/UnixLineEndingInputStream.java

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

src/main/java/org/apache/commons/io/input/WindowsLineEndingInputStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class WindowsLineEndingInputStream extends InputStream {
4444
* @param in The input stream to wrap
4545
* @param ensureLineFeedAtEndOfFile true to ensure that the file ends with CRLF
4646
*/
47-
public WindowsLineEndingInputStream( final InputStream in, final boolean ensureLineFeedAtEndOfFile ) {
47+
public WindowsLineEndingInputStream(final InputStream in, final boolean ensureLineFeedAtEndOfFile) {
4848
this.target = in;
4949
this.ensureLineFeedAtEndOfFile = ensureLineFeedAtEndOfFile;
5050
}

0 commit comments

Comments
 (0)