Click here to Skip to main content
15,886,919 members
Home / Discussions / Java
   

Java

 
GeneralRe: How to use JNI without setting Environment Variables Pin
jschell17-Oct-23 5:47
jschell17-Oct-23 5:47 
GeneralRe: How to use JNI without setting Environment Variables Pin
Valentinor17-Oct-23 19:26
Valentinor17-Oct-23 19:26 
QuestionSending file though socket as byte[] Pin
JohnCodding25-Sep-23 20:52
JohnCodding25-Sep-23 20:52 
GeneralRe: Sending file though socket as byte[] Pin
JohnCodding25-Sep-23 21:33
JohnCodding25-Sep-23 21:33 
GeneralRe: Sending file though socket as byte[] Pin
Richard MacCutchan25-Sep-23 22:32
mveRichard MacCutchan25-Sep-23 22:32 
GeneralRe: Sending file though socket as byte[] Pin
JohnCodding25-Sep-23 23:44
JohnCodding25-Sep-23 23:44 
GeneralRe: Sending file though socket as byte[] Pin
Richard MacCutchan25-Sep-23 23:58
mveRichard MacCutchan25-Sep-23 23:58 
GeneralRe: Sending file though socket as byte[] Pin
JohnCodding26-Sep-23 0:53
JohnCodding26-Sep-23 0:53 
Richard MacCutchan wrote:
But I would be tempted to use ObjectOutputStream write(byte[](Java Platform SE 7 )[^], rather than writeObject, to send the byte data.

In the past when I used socket but not for files, I had some problems when I was using combination of ObjectOutputStream writeBoolean(), writeInt(), writeUTF(), writeObject(), the order was correct when writing/reading but I was still getting some exceptions, and when I switch to only writeObject() I didn't had any problems. And with objects I have more control over what the server gets from the client when the data is wrong, and shadow ban the IP if it keeps sending the wrong data based on some checks. As java class files can easily be decompiled, they can recreate the code and send part of the data good then wrong one just to be jerks or for phishing data. I have some checks on the server to know when someone clearly wasn't supposed to send data, and ignore it, and it did help.
Richard MacCutchan wrote:
I have never had to do any TCP tuning so can't offer any useful suggestions, sorry.

Yeah, until now I didn't had problems, but now with files, also some that can be big, I do care about speed a lot. I'll keep looking and maybe I find a way to remove the limit. As there is clearly a limit because the speed stays around 3 MB/s and I did see someone complaining about the same exact speed, but there wasn't a solution on that thread.
GeneralRe: Sending file though socket as byte[] Pin
jschell3-Oct-23 4:42
jschell3-Oct-23 4:42 
GeneralRe: Sending file though socket as byte[] Pin
JohnCodding12-Oct-23 23:35
JohnCodding12-Oct-23 23:35 
GeneralRe: Sending file though socket as byte[] Pin
jschell13-Oct-23 7:19
jschell13-Oct-23 7:19 
Question[Solved] Getting and setting a File's all attributes Pin
Valentinor24-Sep-23 22:47
Valentinor24-Sep-23 22:47 
AnswerRe: Getting and setting a File's all attributes Pin
Victor Nijegorodov24-Sep-23 23:04
Victor Nijegorodov24-Sep-23 23:04 
GeneralRe: Getting and setting a File's all attributes Pin
Valentinor24-Sep-23 23:17
Valentinor24-Sep-23 23:17 
Answer[Solution] Re: Getting and setting a File's all attributes Pin
Valentinor25-Sep-23 6:26
Valentinor25-Sep-23 6:26 
QuestionGetting java.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.NullP Pin
Member 160852744-Sep-23 5:46
Member 160852744-Sep-23 5:46 
AnswerRe: Getting java.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.NullP Pin
Richard Deeming4-Sep-23 21:21
mveRichard Deeming4-Sep-23 21:21 
AnswerRe: Getting java.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.NullP Pin
Member 160852744-Sep-23 23:55
Member 160852744-Sep-23 23:55 
GeneralRe: Getting java.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.NullP Pin
Member 160852744-Sep-23 23:58
Member 160852744-Sep-23 23:58 
GeneralRe: Getting java.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.NullP Pin
Member 160852745-Sep-23 0:09
Member 160852745-Sep-23 0:09 
GeneralRe: Getting java.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.NullP Pin
Richard MacCutchan5-Sep-23 0:21
mveRichard MacCutchan5-Sep-23 0:21 
AnswerRe: Getting java.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.NullP Pin
jschell5-Sep-23 2:34
jschell5-Sep-23 2:34 
GeneralRe: Getting java.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.NullP Pin
Member 160852745-Sep-23 5:11
Member 160852745-Sep-23 5:11 
GeneralRe: Getting java.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.NullP Pin
Richard Deeming5-Sep-23 21:23
mveRichard Deeming5-Sep-23 21:23 
GeneralRe: Getting java.lang.RuntimeException: ZeroCode Step execution failed. Details:java.lang.NullP Pin
Richard MacCutchan5-Sep-23 22:43
mveRichard MacCutchan5-Sep-23 22:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.