Ask the Expert

Read from a TCP/IP port of an attached device

How I can read from a TCP/IP port of an attached device in an Ethernet network? I want to capture the read data in the ASCII format to write to a iSeries physical file with Java running on the iSeries 400. (Similar to TCP/IP socket programming using Winsock or other Java toolkits.)

If you can get a valid URL to address the device from your iSeries Java application you should be able to read data using either sockets or URL connections using the standard Java sockets classes in the JDK. Then you can use the Java toolkit classes to write to a physical file using JDBC or the record IO classes.


Ask your Web development questions--or help out your peers by answering them--in our live discussion forums.

The Best Web Links: tips, tutorials and more.

Check out this live Q&A with Dave Slater and Jim Mason, How to best get started with WebSphere Development Tools.

This was first published in November 2002

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: