public static String[] readAndDelete(int number)
	{
		if(number == 0)
		{
			return new String[0];
		}
		RandomAccessFile raf = null;
		writeLock.lock();
		String[] lines = new String[number];
		try
		{
			raf = new RandomAccessFile(file, "rw");
			if(raf.length() == 0)
			{
				return new String[0];
			}
			long readPointerStart = 0;
			long readPointerEnd = 0;
			readPointerStart = raf.getFilePointer();
			for(int i = 0; i < number; i++)
			{
				String readLine = raf.readLine();
				if(readLine == null)
				{
					break;
				}
				lines[i] = readLine;
			}
			readPointerEnd = raf.getFilePointer();
			byte[] buf = new byte[1024];
			int n;
			while(-1 != (n = raf.read(buf)))
			{
				raf.seek(readPointerStart);
				raf.write(buf, 0, n);
				readPointerEnd += n;
				readPointerStart += n;
				raf.seek(readPointerEnd);
			}
			raf.setLength(readPointerStart);
		}
		catch(FileNotFoundException e)
		{
			e.printStackTrace();
		}
		catch(IOException e)
		{
			e.printStackTrace();
		}
		finally
		{
			try
			{
				if(raf != null)
				{
					raf.close();
				}
			}
			catch(IOException e1)
			{
				e1.printStackTrace();
			}
			writeLock.unlock();
			
		}
		return lines;
		
	}