Bookmark Topic Watch Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
This page is the FAQ for the I/O and Streams and Sockets and Internet Protocols forums. It's editable by everyone, so add content as you see fit.


Other FAQ pages that deal with I/O

  • AccessingFileFormats - How to read and write various file formats
  • ByteArrayBuffer - a class to read and write primitives from a byte array
  • ReadDoesntDoWhatYouThinkItDoes
  • AvailableDoesntDoWhatYouThinkItDoes
  • How do I EditAnExistingFile
  • The FileUpload page has hints on how to upload files to a server via FTP, SMB and HTTP.
  • I'm getting a TooManyOpenFiles exception
  • WhoisLookup - how to perform a whois lookup programmatically



  • Links to I/O-related software useful for Java developers

  • How to implement SSH, SFTP and SCP in Java: Ganymed SSH-2 for Java - JSch - sshxcute
  • Using ICMP packets (for ping and traceroute) in Java: Jpcap library
  • JNetPcap - library for network packet capture and analysis
  • The Apache Mina project includes an embeddable, automatable FTP Server written in Java.
  • DNSJava is a library for programmatic access to DNS functionality, especially lookups.
  • jcifs-ng is a library for accessing SMB servers like Samba or Windows shared directories.
  • DDC is an Active Directory Java SDK designed to simplify AD interaction for small, medium and large projects



  • Links to I/O-related articles

  • A good introduction to Unicode: The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!) by Joel Spolsky
  • Character Conversions from Browser to Database
  • Changes in Java 5.0 for handling Unicode characters above 65535: Surrogates
  • Overview of the java.nio package - nonblocking I/O
  • Don't println to a Socket - some good hints on how not to do socket communication
  • How to read the Windows Registry
  • USB: Java wrapper for the libusb and libusb-win32 USB library - code examples - jUSB library - libusb4j library - javax.usb - Java USB library
  • Connect through a Proxy




  • Where can I get an implementation of the javax.comm API for Windows?

    Sun does not provide an implementation of javax.comm version 3 for Windows, but version 2 can be used in conjunction with RXTX; see the javax.comm download page for further information. Other options (which do not implement the javax.comm API) are

  • RXTX (open source)
  • SerialPort (commercial, X/Y/ZModem and Kermit implementations are also available)



  • How can I set the client timeout when making an URL connection?

    Starting with Java 5, this functionality is available in the JavaDoc:java.net.URLConnection class and its subclasses (like HttpURLConnection) via the getConnectTimeout/setConnectTimeout methods.

    Jakarta Commons HttpClient also supports setting a timeout.


    How can I check the type of an image file?

    The freely available ImageInfo class can identify certain image types: JPEG, PNG, GIF, BMP, PCX, IFF, RAS, PBM, PGM, PPM and PSD. It also determines certain image properties like height, width and color depth. The Apache Commons Imaging library serves a similar purpose.


    How can I send SMS from a Java application?

    You'll need an SMS library like smsj, SMSLib or smstools and a provider. You can find the latter by googling for "bulk sms http". This article may also be of interest.

    Many cellular providers make an email-to-SMS gateway available. Here are the email addresses for several US providers:

  • T-Mobile: phonenumber@tmomail.net
  • Virgin Mobile: phonenumber@vmobl.com
  • Cingular: phonenumber@cingularme.com
  • Sprint: phonenumber@messaging.sprintpcs.com
  • Verizon: phonenumber@vtext.com
  • Nextel: phonenumber@messaging.nextel.com


  • where phonenumber = your 10 digit phone number

    I would probably not use this gateway for bulk message as the providers no doubt have measures in place to prevent abuse.


    How can I use a modem from within Java? (or, to put it in another way, is there an implementation of JTAPI?)

    The http://xtapi.sourceforge.net/ project "has providers for Microsoft’s TAPI, Serial Voice Modems, and Voice Over IP utilizing the OpenH323 Projects H.323 stack implementation".


    How can I determine the encoding of a given file, or its MIME type?

    The jchardet and juniversalchardet libraries try to determine the encoding. This article talks about various approaches to figure out the MIME type; you may have to try out a few of them to determine which one works best in your situation.


    CategoryFaq
     
    Don't get me started about those stupid light bulbs.
      Bookmark Topic Watch Topic
    • New Topic