Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MSHADE-360] avoid PrintWriter #44

Merged
merged 3 commits into from Apr 12, 2020
Merged

[MSHADE-360] avoid PrintWriter #44

merged 3 commits into from Apr 12, 2020

Conversation

elharo
Copy link
Contributor

@elharo elharo commented Apr 11, 2020

@hboutemy this is also a tad more careful about character encodings

@elharo elharo requested a review from hboutemy April 11, 2020 13:51
InputStreamReader streamReader = new InputStreamReader( data.toInputStream() );
BufferedReader reader = new BufferedReader( streamReader );
String className;

while ( ( className = reader.readLine() ) != null )
{
writer.println( className );
writer.write( className );
writer.write( System.getProperty( "line.separator" ) );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

System.lineSeparator()?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea. done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants