You can display the image in YCbCr space using bufferedImage class in java. For this create an empty buffered image of size same as your RGB image and set all the pixel values using setRGB method as shown below.
BufferedImage ycb = new BufferedImage(w,h,BufferedImage.TYPE_INT_RGB);
int val = (y<<16) | (cb<<8) | cr;
ycb.setRGB(i,j,val);
ImageIO.write(ycb,"png", new File("E:\\Rose\\ycbcr\\ycbcr.png"));