buffer.close();
if (buffer != null) buffer.close();
    public void setFileId(long fileId)    {        if (id == null || id.longValue() != fileId)        {            id = new Long(fileId);            file = null;            try            {    			buffer.close();    		}            catch (IOException e)            {    			e.printStackTrace();    			throw new ResourceError(e.getMessage());    		}            buffer = null;            file = iQuery.get(OriginalFile.class, id);        	buffer = ioService.getFileBuffer(file);		}    }