You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 25, 2020. It is now read-only.
Alano Terblanche edited this page Jun 18, 2018
·
3 revisions
Software usage
Before usage
Ensure you have the prerequisite libraries installed and java jdk8
Usage
The usage is rather simple since only java is required to launch it.
java -jar ocr.jar
Once successful it will read
Server started on port 10000
To connect to this server you can do the following:
String serverName = "localhost";
int port = 10000;
Socket socket = new Socket(serverName, port);
BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
DataOutputStream out = new DataOutputStream(socket.getOutputStream());
String input = "";
while ((input = in.readLine()) != null){
if ("Connected".equals(input)){
out.writeInt(bytes.length);
out.write(bytes);
}else{
socket.close();
return input;
}
}