001package jmri.jmrix.fakeport;
002
003import java.io.IOException;
004import java.io.InputStream;
005
006/**
007 * A fake input stream.
008 *
009 * @author Daniel Bergqvist (C) 2024
010 */
011public class FakeInputStream extends InputStream {
012
013    @Override
014    public int read() throws IOException {
015        try {
016            // This stream will never receive anything. Wait some time
017            // to minimize CPU.
018            Thread.sleep(1000);
019        } catch (InterruptedException ex) {
020            // Do nothing. This method will return -1 anyway.
021        }
022        return -1;
023    }
024
025}