0

I just find the snippet which contains this code:

setHeaderEncoding(ConsoleConstants.UTF8_ENCODING)

But I just have file not found exception. So my question is where to find the lib which contains ConsoleConstants?

Any useful comment is appreciated :)

Andrew

user592704
  • 3,674
  • 11
  • 70
  • 107
  • Isn't the class defined in the import? If you are using eclipse you should be able to do "ctrl+click" on the it to see its definition. – CoolBeans Mar 18 '11 at 03:02
  • finding the complete package name will help track down where the file is from. Look for import something.somethingelse.ConsoleConstants; at the top of the file. – MeBigFatGuy Mar 18 '11 at 03:05
  • I don't know but I cannot import it because I don't have the lib installed or something :( I thought it should be in org.apache.commons.fileupload but I was wrong it is not from there :( – user592704 Mar 18 '11 at 03:53

1 Answers1

1

I think you might be referring to this SO answer: File Upload with Java (with progress bar)

The snippet appears to be using Apache Commons FileUpload, and calling this method. From the context, it would appear that is just wants the standard Java character encoding name for UTF-8; i.e. "UTF-8".

It is impossible to figure out which ConsoleConstants class the code is actually referring to, but it doesn't matter, IMO. Just use a literal string.

Community
  • 1
  • 1
Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
  • So it can be replaced with just a const. ? It is like "UTF-8" etc ? – user592704 Mar 18 '11 at 03:48
  • That's what the answer said... '...the standard Java character encoding name for UTF-8; i.e. "UTF-8".' You should upvote the answer and then accept it (click the check mark). Then go back and accept some answers to your other questions. – Jim Garrison Mar 18 '11 at 03:52