filemapsource.java

来自「这是一款基于PlaceLab软件开发的导航系统中间件的客户端程序.」· Java 代码 · 共 36 行

JAVA
36
字号
/* * Created on Aug 25, 2004 * */package org.placelab.mapper.loader;import java.io.File;import java.io.FileInputStream;import java.io.FileNotFoundException;import org.placelab.collections.Iterator;import org.placelab.core.Coordinate;/** *  */public class FileMapSource extends StreamMapSource {	private FileInputStream stream;		public FileMapSource(String path) throws FileNotFoundException  {		super("File: " + new File(path).getName(), false);				stream = new FileInputStream(path);	}		public boolean isDefault() {		return stream != null;	}	public Iterator query(Coordinate one, Coordinate two) {		// XXX: is not selective based on coordinates		return stream == null ? null : new StreamIterator(stream);	}	}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?