C
caleb
Hi everyone,
I am writing an IRC bot in java using the PircBot API. The main
function of the bot is returning FreeBSD 'man'(manual) pages to a user
that requests them.
ie;
the user on the channel would type;
!man java
The bot would call the onMessage function and check if the string is
listed in an array of commands;
String[] commands = {"!time","!man","!quit","!ect...."};
What I am having trouble working out is which object I should create to
call the man command and then return output to the user who issued the
command.
I am reading through the documentation for java.io and see that there
are classes that deal with;
- InputStreams
- OutputStreams
- ByteStreams
- DataStreams
- ProcessingStreams
From what I understand about FreeBSD/unix, a program is just another
type of file, also the 'Student guide to unix -Harley Hahn' describes a
file as;
"In Unix the term file refers to any source of input or target of
output, not only to a repository of data".
Am I on the right track here? Or am I getting it wrong?
thanks'
caleb.
I am writing an IRC bot in java using the PircBot API. The main
function of the bot is returning FreeBSD 'man'(manual) pages to a user
that requests them.
ie;
the user on the channel would type;
!man java
The bot would call the onMessage function and check if the string is
listed in an array of commands;
String[] commands = {"!time","!man","!quit","!ect...."};
What I am having trouble working out is which object I should create to
call the man command and then return output to the user who issued the
command.
I am reading through the documentation for java.io and see that there
are classes that deal with;
- InputStreams
- OutputStreams
- ByteStreams
- DataStreams
- ProcessingStreams
From what I understand about FreeBSD/unix, a program is just another
type of file, also the 'Student guide to unix -Harley Hahn' describes a
file as;
"In Unix the term file refers to any source of input or target of
output, not only to a repository of data".
Am I on the right track here? Or am I getting it wrong?
thanks'
caleb.