Move files in anticipation of move to modular system
This commit is contained in:
24
src/main/java/pipe/Client.java
Normal file
24
src/main/java/pipe/Client.java
Normal file
@@ -0,0 +1,24 @@
|
||||
package pipe;
|
||||
|
||||
import java.io.RandomAccessFile;
|
||||
|
||||
public class Client {
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
// Connect to the pipe
|
||||
RandomAccessFile pipe = new RandomAccessFile("\\\\.\\pipe\\detest", "rw");
|
||||
String echoText = "Hello word\n";
|
||||
|
||||
// write to pipe
|
||||
pipe.write(echoText.getBytes());
|
||||
|
||||
// read response
|
||||
String echoResponse = pipe.readLine();
|
||||
System.out.println(echoResponse);
|
||||
pipe.close();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user