Java tutorial
/** * Copyright (c) Acroquest Technology Co, Ltd. All Rights Reserved. * Please read the associated COPYRIGHTS file for more details. * * THE SOFTWARE IS PROVIDED BY Acroquest Technolog Co., Ltd., * WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDER BE LIABLE FOR ANY * CLAIM, DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING * OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. */ package acromusashi.stream.component.kestrel.spout; import java.io.File; import org.apache.commons.lang.StringUtils; /** * KestrelSpout????<br> * ??????????? * * @author kimura */ public class RestrictWatcher { /** ? */ protected File targetFile; /** * ?????? * * @param filePath ?? */ public RestrictWatcher(String filePath) { if (StringUtils.isEmpty(filePath) == false) { this.targetFile = new File(filePath); } } /** * ???? * * @return ?????true???????false */ public boolean isRestrict() { if (this.targetFile == null) { return false; } return this.targetFile.exists(); } }