public void syncSingleFile(String fileName, FileOperation fileOperation, TextProcessor textProcessor) {
        byte operation = fileOperation.operation;
        long fileLastModifiedTime = fileOperation.file.lastModified();
        long fileSize = fileOperation.file.length();
        boolean isDir = fileOperation.file.isDirectory();
        FileInputStream is = null;

        try {
            if(textProcessor != null) {
                fileSize = this.getDecryptedFileSize(new FileInputStream(fileOperation.file), textProcessor);
            }
            writeHasNextFileFlag(true);
            if(operation == DropboxConstants.ADD || operation == DropboxConstants.EDIT) {
                writeFileOperation(operation);
                writeFileName(fileName);
                writeFileLastModifiedTime(fileLastModifiedTime);
                writeIsDirFlag(isDir);

                if(fileOperation.file.isDirectory()) {
                    writeFileSize(0);
                }
                else {
                    writeFileSize(fileSize);
                    is = new FileInputStream(fileOperation.file);
                    writeFileContent(is, textProcessor);
                }
            }
            else { // DELETE
                writeFileOperation(operation);
                writeFileName(fileName);
            }
        }
        catch(Exception ex) {
            Logger.getLogger(DropboxClient.class.getName()).log(Level.SEVERE, null, ex);
        }
        finally {
        	try {
        		if(is != null)
				    is.close();
				}
        	catch (Exception ex) {
                Logger.getLogger(DropboxClient.class.getName()).log(Level.SEVERE, null, ex);
			}
        }
    }