Skip to content

Instantly share code, notes, and snippets.

@mikebroberts
Created March 14, 2017 15:43
Show Gist options
  • Save mikebroberts/159d1f9aa0391c6f3ae67e70826d4fcf to your computer and use it in GitHub Desktop.
Save mikebroberts/159d1f9aa0391c6f3ae67e70826d4fcf to your computer and use it in GitHub Desktop.
package io.symphonia;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
public class StreamLambda {
public void handlerStream(InputStream inputStream, OutputStream outputStream) throws IOException {
int letter;
while((letter = inputStream.read()) != -1)
{
outputStream.write(Character.toUpperCase(letter));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment