apache-commons Questions
2
Solved
I have a string like this
String incoming = "<html> <head></head> <body> <p><span style=\"font-family: Arial;\">Ευχαριστώ (eff-kha-ri-STOE) Tι κανείς (tee-KAH-n...
Cuisse asked 11/12, 2019 at 7:19
5
Solved
I have the following setup:
Gradle: 8.5
Spring Boot 3.3.0
Kotlin: 1.9.23
Before I used Spring Boot 3.2.6, and after update to the latest version I encounter the following error when running bootJa...
Infernal asked 18/6 at 16:44
2
Solved
I can create 2 mutually exclusive options using the following:
Option a = OptionBuilder.create("a");
Option b = OptionBuilder.create("b");
OptionGroup optgrp = new OptionGroup();
optgrp .setRequi...
Labelle asked 7/1, 2015 at 14:29
3
Solved
I keep trying to run my code, but when I run it I get the message
"Caused by: java.lang.NullPointerException: Cannot invoke "org.apache.commons.lang3.JavaVersion.atLeast(org.apache.common...
Cyrstalcyrus asked 3/12, 2020 at 0:45
4
I used to work with Apache Commons Cli 1.2. I wanted the parser to ignore arguments if they are unknown (not added to an Options-Object).
Example (pseudocode):
Options specialOptions;
specialOpti...
Triple asked 23/11, 2015 at 15:39
3
Solved
Given a path like /a/./b/c/../d, I would like to remove all the "current directory" indicators (i.e., period) and "parent directory" indicators (i.e., ..), giving a/b/d.
I could use File.getCanoni...
Fivefold asked 8/11, 2012 at 1:49
2
Solved
I am trying to encode html view source as \u03C4. Got help from this ANSWER but first I used org.apache.commons.lang3 but seen THIS LINK that its moved to org.apache.commons.text
Here is my code:
i...
Rapper asked 17/2, 2021 at 19:16
2
Solved
I am currently evaluating implementations between Apache StopWatch and Guava's Stopwatch and the split functionality in the former intrigued me, but I am struggling to understand what exactly it do...
Cymric asked 8/7, 2020 at 22:50
1
Let's consider the following codebase:
val str = "contextId"
println(org.apache.commons.codec.binary.Base64.isBase64(str))
String(java.util.Base64.getDecoder().decode(str))
It prints:
tr...
Rowan asked 9/2 at 10:43
2
Solved
android studio 3.6
in build.gradle:
compileOptions {
targetCompatibility JavaVersion.VERSION_1_8
sourceCompatibility JavaVersion.VERSION_1_8
}
api 'org.apache.commons:commons-io:1.3.2'
in m...
Leandraleandre asked 30/1, 2020 at 14:46
2
Solved
I am updating Jetty9 to Jetty11. I updated my package from javax.servlet to jakarta.servlet because servlet 5.0 is the prerequisite for Jetty11. but the problem is when I am using commons-fileuploa...
Celestial asked 17/8, 2021 at 16:8
9
Solved
I have few Pojos in different packages, each POJO contains set of the another pojo from the same package. I need to copy all items with the same name from Package B Pojos to objects in Package A.
...
Exposed asked 9/5, 2011 at 13:30
3
Solved
I'm using org.apache.commons.lang3.BooleanUtils in the commons-lang3 (version 3.1).
When I try to compile next line of code
BooleanUtils.xor(true, true);
using maven-compiler-plugin (version 3.3...
Potter asked 25/11, 2015 at 14:15
4
Given a long array of latencies which are in milliseconds, I want to calculate percentile from them. I got below method which does the work but I am not sure how I can verify whether this gives me ...
Otter asked 1/1, 2017 at 5:19
31
Solved
How can I convert byte size into a human-readable format in Java?
Like 1024 should become "1 Kb" and 1024*1024 should become "1 Mb".
I am kind of sick of writing this utility me...
Rebak asked 21/9, 2010 at 8:42
5
Solved
I got this error message happening when I'm trying to read a csv:
Exception in thread "main" java.lang.IllegalStateException: No header mapping was specified, the record values can't be accessed b...
Alaynaalayne asked 5/12, 2014 at 19:53
4
Solved
I am writing a small file upload utility thing as part of a larger project. Originally I was handling this from a servlet using the Apache commons File utility classes. Here is a snippet from a qui...
Trichomonad asked 26/1, 2010 at 18:59
10
Solved
Given a list
List<String> l = new ArrayList<String>();
l.add("one");
l.add("two");
l.add("three");
I have a method
String join(List<String> messages) {
if (messages.isEmpty()...
Motherinlaw asked 24/11, 2011 at 9:52
3
I am trying to list all the files under a specific directory in a ftp server.
FTPFile[] subFiles = ftpClient.listFiles("directory");
Although the directory is a valid one , but the code gets stu...
Drusie asked 3/4, 2013 at 14:24
2
Solved
Precondition
I have a string which looks like this:
String myText= "This is a foo text containing ${firstParameter} and ${secondParameter}"
And the code looks like this:
Map<String, Ob...
Chesney asked 27/5, 2022 at 9:33
4
I am trying to read a CSV file with certain headers into a Java object using Apache Commons CSV. However, when I run the code, I get the following exeption:
Exception in thread "main" java.lang.Il...
Gardiner asked 6/12, 2018 at 1:15
6
Solved
I'm using the Apache Commons CLI. By default it orders help options on the command line alphabetically by key. So, what appears is:
-csv
-ip
-msisdn
-xml
But I want to order them as follows:
-c...
Ferity asked 31/7, 2012 at 13:47
8
Solved
Does the library Apache Commons HttpClient support Gzip? We wanted to use enable gzip compression on our Apache server to speed up the client/server communications (we have a php page that allows o...
Hawks asked 5/5, 2010 at 21:55
10
I'm trying to start a Windows service using the Apache Commons Daemon. It works on Windows XP, but I'm trying to run it on Windows 7 x64. It fails to start and I get the following error in the logs...
Hippocrene asked 13/12, 2010 at 22:44
2
I am wondering what is the difference between Apache Commons Lang3 (org.apache.commons.lang3) vs Apache Commons Text (org.apache.commons.text)?
I saw many similarities between them.
For intance, t...
Holding asked 23/10, 2017 at 15:37
1 Next >
© 2022 - 2024 — McMap. All rights reserved.