Learn something new and grow stronger every day, hehe.
One: Java reading and writing
Read the file:
FileInputStreamCreate a FileInputStream by opening a connection to the actual file that passes through the path name in the file system
Name
The tool class altogether 6: Org.apache.commons.io.filefilter. filefilterutils Org.apache.commons.io.
endianutils
filenameutils
filesystemutils
FileUtils
ioutils
The code that normally reads a Web page's source may
The Java.io package provides interfaces and classes to perform basic operations on files, including operations on file and directory attributes, operations on file reads and writes, and so on.The file object can represent files or directories.The
Java IO stream technology-File, javaio
IO stream technology
Concept: input-output:
Input: Read the file to the memory;
Output: write files from memory to other places
Role: mainly solves the problem of data transmission between devices.
File: The
A short time ago, we found that an open-source Apache tool could convert PDF files into images. Without a jar package that directly transforms HTML into images, we could only save the country by curve.I forgot to introduce it. The package for
From http://commons.apache.org/proper/commons-codec/download_codec.cgi
Download commons-codec-1.9-bin.zip unzip get the commons-codec-1.9.jar to add the jar package to the Java project created by ECLIPSE, You can reference the classes provided in
Fileinputstream
Import Java. io. file; import Java. io. fileinputstream; import Java. io. inputstream; public class testfileinputstream {public static void main (string [] ARGs) throws exception {// The exception is thrown and not processed. // Step
Java executes the external program (Apache Commons Exec), apachecommons
Use runtime.getruntime(cmd.exe c to call an external program. The current thread remains waiting in Tomcat. To solve this problem, the new thread was used to receive output
Dom4j is an open-source XML framework for parsing XML documents. This document describes how to use the parser included in dom4j to create and modify an XML document.The dom4j API contains a tool for parsing XML documents. This document uses the
There are three ways to do image I/O in Java (that is, to read pictures and write pictures, without involving complex image processing):1. The Java image I/O API, which supports common images, has been built from Java 2 version 1.4.0.Home:
Transferred from: https://www.cnblogs.com/biehongli/p/6074713.htmlThe 1:java language defines many classes that are specifically responsible for input or output in various ways, and these classes are placed in the java.io package. whichAll input
A jar package that needs to be imported into the jdom;
1. Jdom Create XML
Package com.shengsiyuan.jdom;
Import Java.io.FileWriter;
Import Org.jdom.Attribute;Import org.jdom.Comment;Import org.jdom.Document;Import org.jdom.Element;Import
xml| data
J2ee/xml developers typically use the Document Object Model (DOM) API or a simple API for XML (SAX) API to parse XML documents. However, these APIs have their drawbacks. One of the drawbacks of the DOM API is that it consumes a lot of
/** * does not use recursion to traverse a folder. Speed does not have recursive effect fast */private static list GetFile (String rootdir) {list files = new arraylist ();
linkedlist list = new linkedlist ();
File dir = new file
This is a common knowledge point that has been encountered many times during the completion of a studio task, and is recorded as follows:1, determine whether the file exists, does not exist to create the fileFile file=new file ("c:\\2.jpg"); if (
Java draws a picture and produces a preview of the image file before printing, which is suitable for the development phase. If you want to use the interface to complete the preview, please find another resource.This feature is used primarily for
Looked up a lot of lucene data, wondering why can't share a simple example, I wrote aLucene implementation is actually very simple, first indexed, in the search, easy!Download the jar package, Link here: http://download.csdn.net/detail/dannor2010/818
Keywords: Java FileRecently, we optimized a previously developed general data migration software. In addition to the improvements made by using jdk5.0's multithreading technology, it also compares the performance of writing files in
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.