InputStream to byte[]





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

« Previous 1 2 3 4 5 6 7 Next »
13
Date Submitted Thu. Mar. 16th, 2006 10:49 PM
Revision 1
Coder mattrmiller
Tags Compression | File | GZIPOutputStream | GZIPOutputStreamEx | Java | Stream
Comments 0 comments
in the normal GZIPOutputStream you can not et the compression level. I came across this little script tonight that allows you to set the compression level for GZIPOutputStream.
13
Date Submitted Mon. Mar. 20th, 2006 4:52 PM
Revision 1
Coder mattrmiller
Tags Delete | Extension | File | Folder | Java
Comments 0 comments
Deletes all files of a certain extention from a folder.
12
Date Submitted Thu. Mar. 9th, 2006 4:02 AM
Revision 1
Scripter TimYates
Tags Java | String | Word
Comments 1 comments
If you have ever written a website or java application where people paste stuff in from Word, you are likely to have hit the problem of Word using high ascii chars for "open quotes", "close quotes", reg symbol, etc...

This java class (with a single static method) can replace the most prevalent of these with normal ascii values

Hope it helps someone...
12
Date Submitted Tue. May. 9th, 2006 9:36 AM
Revision 1
Helper jpinkham
Tags Email | Java | Validate
Comments 1 comments
Another solution recommends using a text match pattern.
This works, but as long as you've got mail.jar in your classpath anyway, you might as well use this technique instead. (Plus, I think it works with older JDK 1.2+, whereas pattern.compile is 1.4+)

Note that it also accepts a comma-separated list of emails, just like a To: or CC: address line would.
11
Date Submitted Wed. Mar. 29th, 2006 12:04 PM
Revision 1
Coder mattrmiller
Tags Delete | Directory | Java | Recursive | REMOVE
Comments 1 comments
Recursively delete a directory, emptying all contents.
10
Date Submitted Thu. May. 11th, 2006 10:19 AM
Revision 3
Helper jbuchberger
Tags BATCH | Java
Comments 2 comments
Java properties files can yield undesirable results at runtime, if there happen to be spaces at the end of some lines.

Requires a win32 port for the GNU utilities grep and sed - e.g. http://unxutils.sourceforge.net/.
10
Date Submitted Thu. Mar. 16th, 2006 10:01 PM
Revision 2
Coder mattrmiller
Tags Bytes | Format | Java | String
Comments 0 comments
Format Bytes
9
Date Submitted Wed. Dec. 27th, 2006 9:40 AM
Revision 1
Scripter bertheymans
Tags Java | List | Set | uniqueness
Comments 2 comments
This is a very convenient way to remove all doubles from a List in Java. The only prerequisite is that the elements in the list have proper equals and hashCode methods.

It work by using the constructor of a Set that takes a Collection as an argument.

I poured the snippet in a little program so can run it straight away.
9
Date Submitted Thu. Mar. 16th, 2006 6:44 PM
Revision 1
Helper Snyke
Tags debugging | Java | log4j | logging | Output
Comments 0 comments
Log4J is a really nice Library that aims to facilitate outputting debugging information, but also relevant data, in Java applications. It is highly configurable, using both Categories and Class-Based rules, so that developers can narrow down the problems very well when debugging applications.
9
Date Submitted Thu. May. 18th, 2006 2:02 AM
Revision 3
Helper jbuchberger
Tags Java
Comments 0 comments
With Java Web Start 1.5.0 all of a sudden new proxy properties were introduced (deployment.proxy.http.host, deployment.proxy.http.port and deployment.proxy.bypass.list) valid only for the webstart environment - and if that was not enough yet, it does not support the existing proxy properties, neither the standard, nor the deprecated ones from old Java releases. To topple even that, for the bypass-list the delimiters were changed to semicolon (http.nonProxyHosts has the pipe char as delimiter) ...

standard networking properties

the workaround here makes sure, that if any one of these proxy properties (deprecated, standard or webstart-5 ones) are set, that all the others get the same settings - this pays off, if you're using different third-party components relying on one specific set of these proxy properties (especially if it's beyond your power, in what kind of environment the software will be executed respectively integrated...)
« Previous 1 2 3 4 5 6 7 Next »