341 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
58
views
I got java.io.FileNotFoundException when I call URL.openStream()
I have an URL for file downloading and it works perfectly on my Samsung Galaxy S10 (running Android 12), but the same app throws java.io.FileNotFoundException on my Google Pixel 9 with the latest ...
0
votes
0
answers
53
views
BufferedInputStream vs DataInputStream which is faster for sending byte arrays? [duplicate]
My question is straight forward. I made an app with java sockets which can send as many files as you want between two users.However, sometimes transfer can be slow and i think it is because i am ...
0
votes
1
answer
71
views
readUTF() not working with URCap Development - Java Socket
I'm developing an URCap to a camera installed in an UR Robot and I need to write to and read the response from the camera.
The camera is equipped with an object detection algorithm and the way it ...
0
votes
0
answers
132
views
readUTF and writeUTF greater than 65535
My mmorpg game server has a feature that has finally surpassed the 65535 length limit of sending "string updates" to the client. I was using the readUTF() and writeUTF() methods. I have ...
0
votes
0
answers
35
views
How to properly receive data from input/output streams in Multithreaded Server Client FTP
I'm trying to create a Multithreaded Server Client FTP that will allow the client to perform certain tasks in the background (EX: put test.txt) can run in the background and then the client can input ...
0
votes
1
answer
81
views
Input/OutputStream between System.in and System.out - problem with readUTF() and writeUTF()
I'm trying to set up a very simple communication flow between System.in and System.out in Java, in order to understand how streams work.
I'm using DataInputStream for System.in and DataOutputStream ...
0
votes
1
answer
61
views
Is there a reason why DataInputStream.read() only reads the first few bytes of really big arrays (>100,000 bytes)?
I'm trying to write software that sends a set of data (a portion of a video game) in different formats (chunked, compressed, raw), and measures the speed between each. However, I'm running into an ...
0
votes
1
answer
168
views
Java InputStream float value too big
I am struggling how to read float value from inputStream.
I tried before with BigDecimal, and it was not possible to get the correct number
Problem: im expecting V ~0.00 - 1.50, Later up to 55.00
...
0
votes
1
answer
79
views
Inputting multiple 2D array elements at the same time
I am trying to create a program that will create an mxm grid using a 2D array. I want each of the elements within the array to be a "*". The problem is that I don't want to have to write a ...
user avatar
user18543051
0
votes
0
answers
577
views
Converting InputStream to byteArray[] and assigning it to a variable makes the byteArray[] empty
I have a standalone Spring BOOT Project which receives uploaded file as an byteArray[] and I perform validations on this byteArray[] by converting it back to InputStream and parsing through Apache ...
0
votes
0
answers
31
views
JFrame with JProgressBar not showing components while reading file [duplicate]
I am writing code to read an Impulse Tracker module file into this object. It opens a JProgressBar while the file loads and displays which part of the file is being loaded.
The JFrame that displays ...
-2
votes
2
answers
271
views
Java : know how much bytes were read by ImageIO.read() (and maybe other similar methods)
i am making a java program that reads data from a binary stream (using a DataInputStream).
Sometimes during this process i need to read a data chunk, however the method (which i cannot modify) that ...
0
votes
1
answer
170
views
Problem in Thread synchronization for sockets in Java Android
I am writing two types of packets to a PLC which responds by sending different packets for each type of input packets. I am using socket class with two different threads to achieve this i.e. one ...
1
vote
0
answers
93
views
DataInputStream not getting the right value
I'm trying to setup a server-client file transfer where one user sends a file to the server, and the server sends that file to another user (users in this case are instances of the Client.java class).
...
0
votes
0
answers
459
views
Trying to mock java.io.DataInputStream.read
My application has a piece that does the following:
public ResultObject myMethod(DataInputStream inputStream, int objectLength) {
byte[] buffer = new byte[objectLength];
int bytesRead =...