@@ -0,0 +1,1909 @@
+package net.sf.expectit;%0A%0A/*%0A * #%25L%0A * ExpectIt%0A * %25%25%0A * Copyright (C) 2014 Alexey Gavrilov and contributors%0A * %25%25%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A * %0A *      http://www.apache.org/licenses/LICENSE-2.0%0A * %0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A * #L%25%0A */%0A%0Aimport static net.sf.expectit.matcher.Matchers.contains;%0Aimport static net.sf.expectit.matcher.Matchers.eof;%0Aimport static net.sf.expectit.matcher.Matchers.regexp;%0A%0Aimport java.io.IOException;%0Aimport java.util.concurrent.TimeUnit;%0A%0A/**%0A * A telnet process example.%0A */%0Apublic class TelnetProcessExample %7B%0A    public static void main(String%5B%5D args) throws IOException, InterruptedException %7B%0A        Process process = Runtime.getRuntime().exec(%22telnet rainmaker.wunderground.com%22);%0A%0A        StringBuilder wholeBuffer = new StringBuilder();%0A        Expect expect = new ExpectBuilder()%0A                .withOutput(process.getOutputStream())%0A                .withInputs(process.getInputStream())%0A                .withEchoOutput(wholeBuffer)%0A                .withEchoInput(wholeBuffer)%0A                .withExceptionOnFailure()%0A                .build();%0A%0A        expect.expect(contains(%22Press Return to continue%22));%0A        expect.sendLine();%0A        expect.expect(contains(%22forecast city code--%22));%0A        expect.sendLine(%22SAN%22);%0A        expect.expect(contains(%22X to exit:%22));%0A        expect.sendLine();%0A%0A        String response = wholeBuffer.toString();%0A        System.out.println(response);%0A%0A        expect.close();%0A    %7D%0A%0A%7D%0A

Add telnet process example