Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
0 answers
131 views

java.io.IOException: The pipe is being closed

I am getting this error while building gradlew with Android Studio. Could not write standard input to Gradle Test Executor 1. java.io.IOException: The pipe is being closed at java.base/java.io....
Guava's user avatar
  • 11
0 votes
1 answer
257 views

Piping cat output into a Java jar through the terminal

I have a JAR file that will require use of the standard input. I need to use this command and cannot change it: cat filename | java -jar jarname.jar I want this to be accessible to the JAR somehow, ...
Jack Sack's user avatar
-1 votes
1 answer
3k views

How to use Command Prompt commands from a Java application

I'm trying to create a java program that runs CMD with a specific command dir C:\windows | java -jar C:\\Column.jar 3 When i run it manual works, but I've not been hable to run it from java. I have ...
Austrecliciano's user avatar
0 votes
1 answer
886 views

Why is the piped input stream closed?

I run a small Java 11 http server which processes multipart stream requests containing zipped data. The data is read and unzipped with piped streams. Sometimes IOException: Pipe closed occur, however ...
arweed's user avatar
  • 3
1 vote
1 answer
142 views

Why does writing a value larger than the buffer size of Java's PipedInputStream cause it to hang indefinitely?

This Scala code hangs indefinitely import java.io._ import scala.io.Source import scala.concurrent._ import scala.concurrent.ExecutionContext.Implicits.global def copy(inputStream: InputStream, ...
alcorn's user avatar
  • 1,368
1 vote
0 answers
76 views

Why is this use of piped IO streams in Scala hanging indefinitely? [duplicate]

I'm playing around with the stream interfaces discussed in this blog post. I've made what feels like a simple implementation to test out the interfaces, but it is hanging indefinitely when I run it ...
alcorn's user avatar
  • 1,368
1 vote
1 answer
111 views

Java Process exec method won't let me pass input to a command

I'm practicing java.io methods, so I started by creating a script that prompts the user for a password and prints "correct" if the input is correct. Then, I wrote a java program that ...
TimatoPaste's user avatar
0 votes
0 answers
46 views

Why am I getting Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5 [duplicate]

can someone help me to solve this issue? Not so sure why I am getting Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5 here is the document index I have where the flag ...
Euphoria's user avatar
0 votes
0 answers
53 views

non-blocking forwarding of inbound HTTP request body to outbound HTTP request body with Java

I am looking for a succinct code example that demonstrates non-blocking 'piping' the body of an incoming HTTP POST request to the body of an outgoing HTTP POST request in Java. There are certainly ...
Mark_Sagecy's user avatar
2 votes
2 answers
333 views

Communicate Java and C without Sockets?

I was tasked to write a service in C that listens to a named or unnamed Windows OS pipe (two way data transfer should be possible) and the "host application" that writes data to the OS pipe ...
Giancarlo Metitieri's user avatar
0 votes
1 answer
88 views

sshj: How to pipe input to automated host-side script

So, here's the situation: I would like to use the sshj library to connect to a host which automatically runs a script on connection. Let's say the script merely logs whatever json formated input it ...
Michael Burgardt's user avatar
0 votes
0 answers
117 views

How to use multiple pipe streams

It's a first time on writing here as a Korean. If there's are a few or a lot of grammatical error please understand thanks. I'm trying to make a pipedinputstreams. Its about reading two txt files and ...
Honam's user avatar
  • 1
0 votes
1 answer
204 views

how to send stringed input into ProcessBuilder

class envir { public void run() throws IOException { ProcessBuilder builder = new ProcessBuilder("bash"); builder.redirectInput(ProcessBuilder.Redirect.PIPE); ...
user avatar
0 votes
2 answers
1k views

Is it possible to convert a ByteArrayOutputStream to a InputStream?

Is it possible to convert a ByteArrayOutputStream to a InputStream? I need it for URLConnection.guessContentTypeFromStream(). I need this because I do want to avoid new ByteArrayInputStream(baos....
Marco Sulla's user avatar
  • 15.9k
0 votes
2 answers
258 views

How to transmit data from Nodejs program to Java program?

Inside the Java class is the following: Process process = Runtime.getRuntime().exec("node /home/master/code/nodejs/searchLi.js"); process.waitFor(); BufferedReader reader = new ...
propre_poli's user avatar

15 30 50 per page
1
2 3 4 5
17