1 /****************************************************************
\r
2 * Licensed to the Apache Software Foundation (ASF) under one *
\r
3 * or more contributor license agreements. See the NOTICE file *
\r
4 * distributed with this work for additional information *
\r
5 * regarding copyright ownership. The ASF licenses this file *
\r
6 * to you under the Apache License, Version 2.0 (the *
\r
7 * "License"); you may not use this file except in compliance *
\r
8 * with the License. You may obtain a copy of the License at *
\r
10 * http://www.apache.org/licenses/LICENSE-2.0 *
\r
12 * Unless required by applicable law or agreed to in writing, *
\r
13 * software distributed under the License is distributed on an *
\r
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY *
\r
15 * KIND, either express or implied. See the License for the *
\r
16 * specific language governing permissions and limitations *
\r
17 * under the License. *
\r
18 ****************************************************************/
\r
20 package org.apache.james.mime4j.util;
\r
22 //BEGIN android-changed: Stubbing out logging
\r
23 import org.apache.james.mime4j.Log;
\r
24 import org.apache.james.mime4j.LogFactory;
\r
25 //END android-changed
\r
29 * @version $Id: TempStorage.java,v 1.2 2004/10/02 12:41:11 ntherning Exp $
\r
31 public abstract class TempStorage {
\r
32 private static Log log = LogFactory.getLog(TempStorage.class);
\r
33 private static TempStorage inst = null;
\r
37 String clazz = System.getProperty("org.apache.james.mime4j.tempStorage");
\r
41 inst = (TempStorage) Class.forName(clazz).newInstance();
\r
44 } catch (Throwable t) {
\r
45 log.warn("Unable to create or instantiate TempStorage class '"
\r
46 + clazz + "' using SimpleTempStorage instead", t);
\r
50 inst = new SimpleTempStorage();
\r
55 * Gets the root temporary path which should be used to
\r
56 * create new temporary paths or files.
\r
58 * @return the root temporary path.
\r
60 public abstract TempPath getRootTempPath();
\r
62 public static TempStorage getInstance() {
\r
66 public static void setInstance(TempStorage inst) {
\r
68 throw new NullPointerException("inst");
\r
70 TempStorage.inst = inst;
\r