Chris,
Considering you may go down this path, I'll state my findings to date,
and you can use (and correct/enhance).
de.mud.jta (
http://javassh.org):
This package is open source. It has a vt320 class that one could
theoretically use to handle terminal control codes (you talk to the
vt320 instead of directly to the telnet session). I have not been
able to get the examples to work with my telnet host. The package is
extensive (and complicated). I've asked a question on the source
forge forum to get assistance in where and how one might wire-in a way
to drive a telnet application (screen scrape).
com.jscape.inet.telnet (
http://www.jscape.com):
This package is not open source, and it costs a lot (for the tiny part
I want). It craps-out after 30 days. It has a class specifically
designed for screen scraping (TelnetScript). Using the example
TelnetScript partially works against my telnet host (I get connected
and can do some menus, but I get errors about not handling my terminal
type, which is a show stopper).
org.apache.commons.net.telnet
(
http://http://jakarta.apache.org/com...t/index.html):
This package is open source. This seems to have no 'terminal'
classes, which means the control codes look pretty messy. I was able
to talk to my telnet host without terminal type errors, but later lost
the ability to talk at all (maybe a firewall issue). The example just
starts up input and output streams, so is not helpful to suggest how
to handle screen scraping. I wrote something, but need to get the
firewall thing fixed to test.
socket (
http://www.first.fraunhofer.de/persons/leo/java/Telnet/)
This package is open source, but not supported. This appears to be a
pre-cursor to the de.mud.jta package. This package, though, has a
class called TelnetWrapper, and a method called receiveUntil that made
interacting in screen scrape mode very easy. But when I use the
TelnetWrapper directly, I get the terminal type error on certain
menus, and the host program bombs. The TelnetWrapper and receiveUntil
seem not to be included in the current de.mud package.
--Dale--
"Chris Lamprecht" <> wrote in message news:<bi8pb9$sn5$>...
> Dale,
> Those appear to be VT100 or ANSI-type terminal escape codes. I'm not
> sure if Jakarta net can do anything with those. If not, you'll have to find
> one or write something yourself that basically strips them out (unless you
> want to display it, but I think you said you were just screen scraping).
> The basic format of the control codes is something like "?[2;1H", where the
> "?" is some non-displayable code. In ANSI it's ASCII code 27 (sometimes
> displays as a little left arrow). It might be the same in VT100, I'm not
> sure (Try google, it knows all). I'm going to have to write almost the
> exact same thing (a scraper) soon; I'd appreciate any code you can share
> with me (I haven't actually used Jakarta Commons/net yet).
>
> -Chris
>
> "Dale" <> wrote in message
> news: m...
> > All, There's one more thing that I would like to conquer... handling
> > of control characters.
(snip)
> > So I guess what I'm wondering is if there's some kind of "virtual
> > screen" that someone has come-up with.
> >