// Path: src/jext2/Filesystem.java
// public class Filesystem {
// 	private static Charset charset = Charset.defaultCharset();
// 	private static Logger logger;
// 
// 	static class Jext2Formatter extends Formatter {
// 		private static final DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
// 
// 		@Override
// 		public String format(LogRecord record) {
// 			StringBuilder s = new StringBuilder(1000)
// 			// Timestamp
// 			.append(df.format(new Date(record.getMillis())))
// 			.append("  ")
// 
// 			// Source class name
// 			.append("[")
// 			.append(record.getSourceClassName())
// 			.append(".")
// 			.append(record.getSourceMethodName())
// 			.append("]")
// 			.append("  ")
// 
// 			// Loglevel
// 			.append(record.getLevel())
// 			.append("  ")
// 
// 			// Message
// 			.append(formatMessage(record))
// 			.append("\n");
// 			return s.toString();
// 		}
// 	}
// 
// 	public static Charset getCharset() {
// 		return charset;
// 	}
// 	public static void setCharset(Charset charset) {
// 		Filesystem.charset = charset;
// 	}
// 
// 	/**
// 	 * Get the PID of the running process
// 	 */
// 	public static long getPID() {
// 		String appName = ManagementFactory.getRuntimeMXBean().getName();
// 		String strPid = appName.substring(0, appName.indexOf('@')-1);
// 		return Long.parseLong(strPid);
// 	}
// 
// 	public static void initializeLoggingToFile(String logfile) throws IOException {
// 		FileHandler handler = new FileHandler(logfile);
// 		handler.setFormatter(new Jext2Formatter());
// 
// 		logger.addHandler(handler);
// 	}
// 
// 	public static void initializeLoggingToConsole() {
// 		ConsoleHandler handler = new ConsoleHandler();
// 		handler.setFormatter(new Jext2Formatter());
// 
// 		logger.addHandler(handler);
// 	}
// 	
// 	public static void initializeLogging() {
// 		LogManager logman = LogManager.getLogManager();
// 		logman.reset();
// 
// 		logger = Logger.getLogger("jext2");
// 		logger.setLevel(Level.WARNING);
// 	}
// 
// 	public static void setLogLevel(String level) {
// 		logger.setLevel(Level.parse(level));
// 	}
// 
// 	public static Logger getLogger() {
// 		return logger;
// 	}
// }


import jext2.Filesystem;
import java.util.logging.Level;
import java.util.logging.Logger;
/*
 * Copyright (c) 2011 Marcel Lauhoff.
 * 
 * This file is part of jext2.
 * 
 * jext2 is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * jext2 is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with jext2.  If not, see <http://www.gnu.org/licenses/>.
 */

package jext2.exceptions;



public class JExt2Exception extends Exception {
	protected static final int ERRNO = -1;

	private static final long serialVersionUID = -7429088074385678308L;

// Path: src/jext2/Filesystem.java
// public class Filesystem {
// 	private static Charset charset = Charset.defaultCharset();
// 	private static Logger logger;
// 
// 	static class Jext2Formatter extends Formatter {
// 		private static final DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
// 
// 		@Override
// 		public String format(LogRecord record) {
// 			StringBuilder s = new StringBuilder(1000)
// 			// Timestamp
// 			.append(df.format(new Date(record.getMillis())))
// 			.append("  ")
// 
// 			// Source class name
// 			.append("[")
// 			.append(record.getSourceClassName())
// 			.append(".")
// 			.append(record.getSourceMethodName())
// 			.append("]")
// 			.append("  ")
// 
// 			// Loglevel
// 			.append(record.getLevel())
// 			.append("  ")
// 
// 			// Message
// 			.append(formatMessage(record))
// 			.append("\n");
// 			return s.toString();
// 		}
// 	}
// 
// 	public static Charset getCharset() {
// 		return charset;
// 	}
// 	public static void setCharset(Charset charset) {
// 		Filesystem.charset = charset;
// 	}
// 
// 	/**
// 	 * Get the PID of the running process
// 	 */
// 	public static long getPID() {
// 		String appName = ManagementFactory.getRuntimeMXBean().getName();
// 		String strPid = appName.substring(0, appName.indexOf('@')-1);
// 		return Long.parseLong(strPid);
// 	}
// 
// 	public static void initializeLoggingToFile(String logfile) throws IOException {
// 		FileHandler handler = new FileHandler(logfile);
// 		handler.setFormatter(new Jext2Formatter());
// 
// 		logger.addHandler(handler);
// 	}
// 
// 	public static void initializeLoggingToConsole() {
// 		ConsoleHandler handler = new ConsoleHandler();
// 		handler.setFormatter(new Jext2Formatter());
// 
// 		logger.addHandler(handler);
// 	}
// 	
// 	public static void initializeLogging() {
// 		LogManager logman = LogManager.getLogManager();
// 		logman.reset();
// 
// 		logger = Logger.getLogger("jext2");
// 		logger.setLevel(Level.WARNING);
// 	}
// 
// 	public static void setLogLevel(String level) {
// 		logger.setLevel(Level.parse(level));
// 	}
// 
// 	public static Logger getLogger() {
// 		return logger;
// 	}
// }


// Path: src/jext2/exceptions/JExt2Exception.java
import jext2.Filesystem;
import java.util.logging.Level;
import java.util.logging.Logger;

/*
 * Copyright (c) 2011 Marcel Lauhoff.
 * 
 * This file is part of jext2.
 * 
 * jext2 is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * jext2 is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with jext2.  If not, see <http://www.gnu.org/licenses/>.
 */

package jext2.exceptions;



public class JExt2Exception extends Exception {
	protected static final int ERRNO = -1;

	private static final long serialVersionUID = -7429088074385678308L;

	Logger logger = Filesystem.getLogger();