comparison src/org/tmatesoft/hg/util/RegularFileInfo.java @ 456:909306e412e2

Refactor LogFacility and SessionContext, better API for both
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Mon, 18 Jun 2012 16:54:00 +0200
parents 48f993aa2f41
children c02b5710d9ac
comparison
equal deleted inserted replaced
454:36fd1fd06492 456:909306e412e2
13 * For information on how to redistribute this software under 13 * For information on how to redistribute this software under
14 * the terms of a license other than GNU General Public License 14 * the terms of a license other than GNU General Public License
15 * contact TMate Software at support@hg4j.com 15 * contact TMate Software at support@hg4j.com
16 */ 16 */
17 package org.tmatesoft.hg.util; 17 package org.tmatesoft.hg.util;
18
19 import static org.tmatesoft.hg.util.LogFacility.Severity.Info;
18 20
19 import java.io.File; 21 import java.io.File;
20 import java.io.FileInputStream; 22 import java.io.FileInputStream;
21 import java.io.FileNotFoundException; 23 import java.io.FileNotFoundException;
22 import java.io.IOException; 24 import java.io.IOException;
83 return new ByteArrayReadableChannel(getLinkTargetBytes()); 85 return new ByteArrayReadableChannel(getLinkTargetBytes());
84 } else { 86 } else {
85 return new FileInputStream(file).getChannel(); 87 return new FileInputStream(file).getChannel();
86 } 88 }
87 } catch (FileNotFoundException ex) { 89 } catch (FileNotFoundException ex) {
88 StreamLogFacility.newDefault().debug(getClass(), ex, null); 90 StreamLogFacility.newDefault().dump(getClass(), Info, ex, null);
89 // shall not happen, provided this class is used correctly 91 // shall not happen, provided this class is used correctly
90 return new ByteArrayReadableChannel(null); 92 return new ByteArrayReadableChannel(null);
91 } 93 }
92 } 94 }
93 95