All pastes #255233 Raw Edit

Something

public text v1 · immutable
#255233 ·published 2006-11-22 19:36 UTC
rendered paste body
try{
    int max = (Integer) (ois.readObject());
    byte[] serial = new byte[max];
    for(int i = 0; i < max; i++)
	  serial[i] = (Byte) ois.readObject();
    ObjectInputStream oo = new ObjectInputStream(new ByteArrayInputStream(serial));
static BufferedImage a = ImageIO.read(oo);
					System.out.println(a.toString());
					oo.close();
					try {
						File file = new File("Screenshot.jpg");
						ImageIO.write(a, "jpg", file);
					} catch (IOException e) {}
					
				}catch(ClassNotFoundException e){}