Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    /**
     * used in character() method of DefaultHandler subclasses to skip carriage
     * return type data
     * 
     * @param data
     * @param length
     * @return
     */
    public static boolean isWhiteSpace(char[] data, int length) {
        return isWhiteSpace(data, 0, length);
    }

    /**
     * used in character() method of DefaultHandler subclasses to skip carriage
     * return type data
     * 
     * @param data
     * @param start
     * @param length
     * @return
     */
    public static boolean isWhiteSpace(char[] data, int start, int length) {
        boolean result = true;
        for (int i = 0; i < length; i++) {
            if (!Character.isWhitespace(data[start + i])) {
                result = false;
                break;
            }
        }
        return result;
    }
}