Initial commit
[squelch.git] / src / main / java / net / jaekl / squelch / util / ConsoleUtil.java
1 package net.jaekl.squelch.util;
2
3 import java.io.IOException;
4
5 public class ConsoleUtil {
6         protected static volatile ConsoleUtil m_inst = null;
7         
8         ConsoleUtil() {
9                 ;
10         }
11         
12         public static ConsoleUtil getInst() 
13         {
14                 ConsoleUtil result = m_inst;
15                 if (null == m_inst) {
16                         synchronized (ConsoleUtil.class) {
17                                 result = m_inst;
18                                 if (null == result) {
19                                         m_inst = result = new ConsoleUtil();
20                                 }
21                         }
22                 }
23                 return result;
24         }
25         
26         public ConsoleInputImpl getInput() throws IOException
27         {
28                 return new ConsoleInputImpl();
29         }
30 }