IT. Expert System.

Java Standard Edition (SE)


Troubleshooting Tips

  • A File object represents a file name, not an actual file. Such objects are, moreover, immutable. Thus the code
        File f1 = new File("foo");
        File f2 = new File("bar");
    will rename the file named "foo" (if it exists) to "bar". It will not change the value of the File object referred to by f1; in particular, the expression f1.getPath() will still evaluate to "foo".
  • The available method of the InputStream class and its subclasses does not necessarily return the maximum number of bytes that can be read without blocking. In particular, code of the form
        int n = in.available();
        byte buf = new byte[n];; 
    is not guaranteed to read all of the remaining bytes from the given input stream. Similarly, the ready method of Reader and its subclasses may return false even if the stream is ready to be read.
  • The read(byte[]) and read(byte[], int, int) methods of InputStream and its subclasses are not guaranteed to read all available bytes. A loop may be required, for example, in order to read a large file into an array:
        for (int off = 0; off < size;) {
            int r =, off, buf.length - off);
            if (r == -1) break;
            off += r;
    Alternatively, a BufferedInputStream may be used. Similar remarks apply to the read(char[]) and read(char[], int, int) methods of Reader and its subclasses.
  • The PrintStream and PrintWriter classes suppress all I/O errors. To see whether an error has occurred, invoke the checkError method.
  • PrintStream and PrintWriter objects do not always flush their output. To arrange for automatic flushing, use the two-argument constructors of these classes and specify true for the second argument.


Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)





Java Script








Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 433 / 158869881. Delta: 0.06454 с