ThreeB 1.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Hierarchy
- Class Members

Static Package Functions
Util Class Reference
Classes related to the ImageJ Plugin

Utility calss to hold a number of handy static functions. More...

List of all members.

## Static Package Functions
static String | read (Reader in)
static SPair | getFileName (String t)

## Detailed Description

Utility calss to hold a number of handy static functions.

Definition at line 45 of file three_B.java.

## Member Function Documentation

static String Util::read | ( | Reader | in | ) | `[inline, static, package]`

Read a file into a string.

It simply sidcards errors because if the file is missing from the JAR archive, then extreme badness has happened and I have no idea how to recover.

Parameters:

  in | File to be read

Returns:
  file contents in a string

Definition at line 53 of file three_B.java.

Referenced by ThreeBHelp::run(), and three_B::run().

        {
            try {
                final char[] buffer = new char[100];
                StringBuilder out = new StringBuilder();
                int read;
                do
                {
                    read = in.read(buffer, 0, buffer.length);
                    if (read>0)
                        out.append(buffer, 0, read);
                } while (read>=0);
                return out.toString();
            }
            catch(java.io.IOException err)
            {
                return "";
                //What do we do here?
            }
        }

The documentation for this class was generated from the following file:

- three_B.java