-
Url i/o
If I can do this:
URL url = new URL("ftp://user01/README.txti");
URLConnection urlc = url.openConnection();
InputStream is = urlc.getInputStream(); // To read
OutputStream os = urlc.getOutputStream(); // To write
Then why can't I do this:
URL url = new URL("afp://user01/README.txt");
InputStream is = urlc.getInputStream(); // To read
OutputStream os = urlc.getOutputStream(); // To write
(afp is for Macs)
(I don't want to use http)
I vaguely remember on windows all I had to do was \\hostname\dir\aFile.txt and it just worked (I thought I used the File class not a URL). I take it I have to use a URL with smb:, nfs: , etc. for everyone else?
-
File Server IO
Good grief. All I got to do is use the /Volumes/<file share>pathname! It just has to be mounted to use the Java File class. I've added the /Volumes/<file share> to the login items list for a user account who is automatically logged in on startup.
Is there a better way to make sure my file shares are mounted?
Why in the world am I told to use nfs,ftp,smb,http,... etc?