import java.io.*;
class ByteArrayTest 
{
public static void main(String[] args) throws Exception
{
String tem="abcdefdjfjalfjadlfj";
byte src[]=tem.getBytes();
ByteArrayInputStream input=new ByteArrayInputStream(src);
ByteArrayOutputStream output=new ByteArrayOutputStream();
new ByteArrayTest.transform(input,output);
byte result[]=output.toByteArray();
System.out.println(new String(result));

}
public void transform(InputStream in ,OutputStream out)
{
int c=0;
try
{
    while ((c=in.read())!=-1)
{
    int e=(int)Character.toUpperCase((char)c);
    out.write(e);
}
}        catch (Exception e)
{
System.out.println(e.getMessage());
}
}

}