Java– category –
-
Java
Java recursively searches for files
[] Introducing a sample program in Java that recursively searches for files from a specified directory, including subdirectories, and obtains a list of files that match the search conditions. These are equivalent to the UNIX command ls -R and the Windows command dir /s... -
Java
Java File Copy (easy and fast)
[FileChannel#transferTo] Introducing a sample program to copy files in Java. The sample program uses the New I/O java.nio.channels.FileChannel#transferTo method introduced in J2SE1.4. Buffer required for loading data... -
Java
Java file copy (change buffer size)
[] Introducing a sample program that performs copy processing using input/output streams using java.io.InputStream and java.io.OutputStream in Java. In copy processing using streams, by increasing the read buffer size, even large files can be relatively... -
Java
Displays a list of files in the Java directory
[] Introducing a sample program in Java that displays a list of files in a specified directory. To display the file list, use the following method of the java.io.File class. list()...Files and directories contained in the specified directory... -
Java
Get extension from Java filename
[] This is a sample source for getting the extension from a file name in Java. [] /** * Returns the extension from the file name. * @param fileName File name * @return File extension */ public static String getSuffix(String fileName) { if (fileName == null) ... -
Java
Convert URLs in Java strings to links
[] This is a sample source that converts a URL in a string into a link (a href=...) using regular expressions in Java. 【】 /** Regular expression pattern for extracting URL */ public static final Pattern convURLLinkPtn = Pattern.compile ("(http://|https://){1}[\\w\\.\. .. -
Java
Remove extensions from Java filenames
[] This is a sample source that returns the file name with the extension removed in Java. [] /** * Returns the file name without the extension. * @param fileName File name * @return File name */ public static String getPreffix(String fileName) {... -
Java
Shaped by Java LPAD and RPAD
[] Introducing sample source that performs processing similar to the SQL functions LPAD and RPAD on strings in Java. These are very useful when dealing with fixed length formats. LPAD...Fills a repeated string to the left of a string and returns it so that the total number of characters is the specified number of digits... -
Java
Java Reflection Made Easy
[Java reflection made easy] Introducing a utility class that allows you to easily use Java's reflection API. [] Reflection API is included in the "java.lang.reflect" package, and is used to obtain information such as fields and methods from Java classes. -
Java
Parsing HTTP with Java Log Filter
[] Introducing a useful Filter class that implements javax.servlet.Filter, analyzes the content of HTTP requests, and outputs logs. This log filter uses "java.util.logging.Logger" for log output, and you can change the information output by changing the log level. -
Java
Extract Java system icons
[] Introducing a sample program that uses Java to extract the icon of a specified file into a png format image file. The specified file can be any executable file with an .exe extension, dll, xls, doc, etc. I searched the internet for similar methods...
12