Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * To change this template, choose Tools | Templates
  * and open the template in the editor.
  */
 
 package it.grabz.grabzit;
 
Represents the screenshot file generated by GrabzIt

Author(s):
GrabzIt
Version:
2.0
public class GrabzItFile {
    private byte[] bytes;
    public GrabzItFile(byte[] bytes)
    {
        this. = bytes;
    }

    
Save GrabzItFile to physical file.

Parameters:
path The path to save the file to
Throws:
java.io.IOException
java.lang.Exception
    public void Save(String paththrows IOExceptionException
    {
        FileOutputStream fileOuputStream = null;
        try
        {
            fileOuputStream = new FileOutputStream(path);
            fileOuputStream.write(getBytes());
            fileOuputStream.close();
        }
        finally
        {
            if (fileOuputStream != null)
            {
                fileOuputStream.close();
            }
        }
    }

    

Returns:
the raw bytes of the screenshot file
    public byte[] getBytes() {
        return ;
    }
New to GrepCode? Check out our FAQ X