如何在java中读取磁盘扇区? [英] How to read disk sectors in java ?

查看:357
本文介绍了如何在java中读取磁盘扇区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在MFC(VC ++)做了一个小项目。通过使用handle,createfile和readfile函数,我逐个扇区地读取数据。在java中是否有任何函数可以明智地读取数据扇区?

I did a small project in MFC(VC++). There by using handle, createfile and readfile functions i am reading the data sector by sector. Is there any functions in in java to read the data sector wise ?

推荐答案

参见http://docs.oracle.com/javase/tutorial/essential/io/fileio.html [ ^ ]有关Java文件I / O系统的信息。假设您可以打开文件或设备,那么它应该与C ++中的大致相同。
See http://docs.oracle.com/javase/tutorial/essential/io/fileio.html[^] for information on the Java File I/O system. Assuming you can open the file or device then it should be broadly the same as in C++.


您无法执行此操作。原因是Java无法直接调用Windows API。



您可以使用Java Native Interface(JNI)来调用Windows API。
You can't do this. The reason is Java can't call Windows API directly.

You can use Java Native Interface (JNI) for calling Windows APIs.


这篇关于如何在java中读取磁盘扇区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆