Questions tagged [apache-commons]

The Apache Commons project provides reusable, open source Java software components. Consider using a component specific tag (such as apache-commons-lang) rather than this general tag.

The Apache Commons is a project of the Apache Software Foundation and includes many components previously found in the retired Apache Jakarta Project. Apache Commons projects are gathered into three groups:

  • Apache Commons Proper is the group of Apache Commons components that are actively being supported by the Apache Commons community.

  • Apache Commons Sandbox is the group of proposed Apache Commons components that are in the process of building a community of users and developers. The sandbox serves the purpose of vetting proposed components for inclusion into Apache Commons. Once the whole Apache Commons community feels a sandbox component has gained a large enough following, the sandbox component can graduate to Apache Commons Proper

  • Apache Commons Dormant is a group of Apache Commons Components that are no longer in active development. There is little community support for these components and most likely will not be released.

For more information, visit the Apache Commons website to learn about the individual components as well as learn how to contribute.

1814 questions
0
votes
2 answers

Latest version of Apache Commons Lang 3

I'm reading the API for StringUtils, and it refers to the method truncate, since API 3.5. But, the latest version is 3.4. according to the apache commons site. I don't even see a 3.5 development branch on their git or in maven central. What is the…
Stealth Rabbi
  • 10,156
  • 22
  • 100
  • 176
0
votes
1 answer

Commons.io error but working?

im using this code to "backup" a realm database on first run: try { FileUtils.copyFile(new File(realm.getPath()), new File(Environment.getExternalStorageDirectory()+"/old_db.realm")); } catch…
user2582318
  • 1,607
  • 5
  • 29
  • 47
0
votes
1 answer

Classloading conflicts with apache commons classes for app deployed to WAS 6.1

I have an app that uses apache-commons-collections v3.2.1. When I deploy the war file using the WAS 6.1 Integrated Solutions Console I get errors because the commons-collections.jar file in isclite.ear gets loaded before the one that I bundle with…
Laran Evans
  • 1,283
  • 5
  • 15
  • 31
0
votes
1 answer

FileUtils.copyURLToFile not working with low internet speeds

I am using apache commons-io FileUtils for downloading a file into android device from given url. FileUtils.copyURLToFile(new URL(urlString), tempFolderFile) This works very well under normal internet speeds, but does not work at all under 2G…
jay
  • 1,982
  • 2
  • 24
  • 54
0
votes
1 answer

Modify filefilter

The below code gives me the file path of the files in a directory that ends with "-path.mp4".But I need to get the file path of the files in a directory that doesn't end with "-path.mp4". List results = new ArrayList(); File…
a0x2
  • 1,995
  • 1
  • 18
  • 26
0
votes
2 answers

org.apache.commons.collections.map.ListOrderedMap

I'm refactoring some legacy code, and I keep running into this Object. I would like to get more use out of this Class, but I'm having a hard time finding an example of its use that is relevant. So far I only have found javadocs and source code. Does…
bakoyaro
  • 2,550
  • 3
  • 36
  • 63
0
votes
1 answer

Using java library installed via apt

I just installed the Apache Commons math library with apt (libcommons-math3-java) on my debian machine and apparently it gets installed to the /usr/share/java directory: $ ls /usr/share/java | grep math commons-math3-3.3.jar commons-math3.jar But…
nradk
  • 680
  • 9
  • 19
0
votes
1 answer

converting Japanese characters to hex not working

My code is very simple (using commons-codec-1.10.jar) System.out.println(Hex.encodeHex("三菱グループ".getBytes(StandardCharsets.UTF_8), true)); it yields e4b889e88fb1e382b0e383abe383bce38397 in my PC, but in accoridng to…
musicsquad
  • 95
  • 1
  • 3
  • 9
0
votes
2 answers

Download XML from a URL without having special characters in it

this is my Code to Download an Xml import org.apache.commons.io.FileUtils; String fileURL = "https://www.sec.gov/Archives/edgar/data/16160/000001616016000061/calm-20160528.xml"; URL url = new URL(fileURL); File file = new…
John Adam
  • 29
  • 7
0
votes
1 answer

How to convert exponents in a csv file from Java

I am printing some data into a CSV file using Apache Commns CSV. One of the fields contains 15 digit number and is of type String. This field prints as exponential number in CSV instead of a complete number. I know Excel does that but is there a way…
Jaykumar
  • 165
  • 1
  • 8
  • 23
0
votes
1 answer

FTPClient Java speedup download

What is the max download-speed with 1 thread of apaches FTPClient? I'm not able to get more, than about 6mb/s with an FPTSClient connection (AUTH SSL). When i connect via an Ftp Tool like FTP Rush im able to get 150mb/s and more! 1,000.0M byte(s)…
PinkyTV
  • 118
  • 2
  • 14
0
votes
3 answers

org.apache.commons.imaging.ImageReadException: Couldn't read magic numbers to guess format

I am trying to upload an image via jsp and at back end i am trying to read its metadata. But i am getting this error org.apache.commons.imaging.ImageReadException: Couldn't read magic numbers to guess format. final ImageMetadata metadata =…
prem30488
  • 2,828
  • 2
  • 25
  • 57
0
votes
3 answers

android java what is a long[ ][ ]?

I need to do the chiSquaredTest. I'm using the Apache Commons Math library but not sure what is a long[][] what the difference to a long[] ? Here is the method description : public double chiSquareTest(long[][] counts) throws…
0
votes
1 answer

Base64 encoding and decoding apache commons

I am note sure what is wrong with the below code. I am trying to encode an JPG file with base64 encoding. After encoding i am checking is it base64 encoded, it returns false. I am unable to find what is that I am missing. public String …
AKV
  • 183
  • 4
  • 24
0
votes
2 answers

How to count number of columns in CSV using Apache Commons CSV?

How do I count the number of columns in a CSV file using Apache Commons CSV? My goal is to generate headers for the CSVParser, so long as I can determine the number of columns. Example CSV file: 0,1,0 1,2,3 2,3,4 ... In this case the number of…
Gladclef
  • 687
  • 1
  • 8
  • 17