public static byte[] getFileContent(String path) throws IOException {
		FileConnection file = null;
		
		if (path.startsWith("file://"))
			path = path.substring(7);
		else if (!path.startsWith("/"))
			path = "/" + path;

		try {
			file = (FileConnection) Connector.open("file://" + path,
					Connector.READ);
			int fileSize = (int) file.fileSize();
			if (fileSize > 0) {
				byte[] data = new byte[fileSize];
				InputStream input = file.openInputStream();
				input.read(data);
				Thread.yield();
				input.close();
				return data;
			} else {
				throw new NullPointerException("File " + path + " is empty.");
			}
		} catch (IOException e) {
			throw e;
		} finally {
			if (file != null && file.isOpen())
				file.close();
		}
	}