private void write(){
		//Writing to OutputStream
			try {				
				try {
					transferUsePermit.acquire();
				} catch (InterruptedException e){ } //never thrown
					if (transfer==null)
						transfer=new NullTransfer();
					//To ensure memory space and that the objects are properly serialised
					oos.reset();			
				 	oos.writeObject(transfer);
			} catch (IOException e){
				conn.exceptionEncountered(e,this);
				try {
					close();
				} catch (IOException ioe){ }
			} finally {
				//Reset transfer to NullTransfer
				transfer=null;
				transferUsePermit.release();
					
				
				//allow transfer to get Changed now if it was changed
				if (transferChangePermit.availablePermits()==0)
					transferChangePermit.release();
			}
	}