I have this code to receive te data from port to java system.out te problem
it's reciece 1111 without any contact when I run my program and connect to the port the 1 was recieve

this is my code

Java Code:
public class Trt implements Runnable, SerialPortEventListener  {
    
     static CommPortIdentifier portId;
    static Enumeration portList;

    InputStream inputStream;
    SerialPort serialPort;
    Thread readThread;

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        
              Win32Driver w32Driver= new Win32Driver();
       
        w32Driver.initialize();
     
         portList = CommPortIdentifier.getPortIdentifiers();

        while (portList.hasMoreElements()) {
            portId = (CommPortIdentifier) portList.nextElement();
            if (portId.getPortType() == CommPortIdentifier.PORT_SERIAL) {
                 if (portId.getName().equals("COM9")) {
			//                if (portId.getName().equals("/dev/term/a")) {
                 
                     
                   Trt read=new Trt();
                     
                     
                }
            }
        }
        
        
        
        
    }
    
    
    
    
    
    
     public Trt() {
         
                 
        
        try {
            serialPort = (SerialPort) portId.open(this.getClass().getName(), 2000);
        } catch (PortInUseException e) {System.out.println(e);}
        try {
            inputStream = serialPort.getInputStream();
        } catch (IOException e) {System.out.println(e);}
	try {
            serialPort.addEventListener(this);
	} catch (TooManyListenersException e) {System.out.println(e);}
        serialPort.notifyOnDataAvailable(true);
        try {
            serialPort.setSerialPortParams(9600,
                SerialPort.DATABITS_8,
                SerialPort.STOPBITS_1,
                SerialPort.PARITY_NONE);
        } catch (UnsupportedCommOperationException e) {System.out.println(e);}
        readThread = new Thread(this);
        readThread.start();
    }

    public void run() {
        try {
            Thread.sleep(20000);
        } catch (InterruptedException e) {System.out.println(e);}
    }

    public void serialEvent(SerialPortEvent event) {
        switch(event.getEventType()) {
    
        case SerialPortEvent.OUTPUT_BUFFER_EMPTY:
            break;
        case SerialPortEvent.DATA_AVAILABLE:
            byte[] readBuffer = new byte[1024];

            try {
                while (inputStream.available() > 0) {
                    int numBytes = inputStream.read(readBuffer);
                    // System.out.print(new String(readBuffer));
                }
               System.out.println(new String(readBuffer));
            } catch (IOException e) {System.out.println(e);}
            break;
        }
    }

}