Skip to content

Commit 042410c

Browse files
committed
Remove unneeded method from NetCater interface
1 parent 70804b0 commit 042410c

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

netcat/src/main/java/com/github/dddpaul/netcat/NetCat.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ public void closeOutput()
4848
output = null;
4949
}
5050

51-
@Override
52-
public OutputStream getOutput()
53-
{
54-
return output;
55-
}
56-
5751
/**
5852
* Strip last CR+LF
5953
*/

netcat/src/main/java/com/github/dddpaul/netcat/NetCater.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ enum Proto { TCP, UDP }
2020
public void setInput( InputStream input );
2121
public void createOutput();
2222
public void closeOutput();
23-
public OutputStream getOutput();
2423
public String getOutputString();
2524
public boolean isConnected();
2625
public boolean isListening();

netcat/src/main/java/com/github/dddpaul/netcat/ui/ResultFragment.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,7 @@ public void netCatIsCompleted( Result result )
127127
EventBus.getDefault().post( new ActivityEvent( state ) );
128128
break;
129129
case RECEIVE:
130-
// Strip last CR+LF
131-
String s = netCat.getOutput().toString();
132-
if( s.length() > 0 ) {
133-
outputView.setText( s.substring( 0, s.length() - 1 ) );
134-
}
130+
outputView.setText( netCat.getOutputString() );
135131
netCat.closeOutput();
136132
if( netCat.isConnected() ) {
137133
disconnect();

0 commit comments

Comments
 (0)