@Override
    public void processing() throws IOException {
    	DataInputStream   reader = new DataInputStream(inputStream);
        PrintStream  writer = new PrintStream(outputStream);
        String line = null;
       

         while(!suspending){
        	switch(step) {
        	case 0:
        		if((line = reader.readLine()) != null)
        			fileLine++;
        		else {
        			reader.close();
        			inputStream.close();
        			inputStream = new TransactionalFileInputStream(new File(arguments.get(1)));
        			reader = new DataInputStream(inputStream);
        			step++;
        		}
        		break;
        	case 1:
        		if(lineCount < fileLine - outputLine) {
	        		reader.readLine();
	        		lineCount++;
        		}
        		else {
        			step++;
        		}
        		break;
        	case 2:
        		if((line = reader.readLine()) != null) {
        			writer.println(line);
        			writer.flush();
        		}
        		else {
        			step++;
        		}
        		break;
        	default:
        		LOG.error("TailProcess[" + id + "]: failed");
        		step = 3;
        	}
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                LOG.error("GrepProcess[" + id + "]: interrupted", e);
            }
        	
            if(step == 3)break;
        }
    }