Security questions

A

Alex

Hi , I'm developing a piece of software as part of a Univ. project
(http://www.dcs.warwick.ac.uk/~csvmh) and I have a few questions...

1) For security reasons I want to be able to store an output stream in main
memory rather than on disk (i.e. 'something else' vs FileOutputStream). Is
there something in the Java API for doing this?

2) Is there a way of forcing FileOutputStream to write on the same physical
area on the HDD? And is there a way of controlling other applications from
accessing that part of the HDD while my application is running?

HDD = Hard Disk Drive.

Thanks.
 
R

Roedy Green

Is there a way of forcing FileOutputStream to write on the same physical
area on the HDD?

same as what?

If you use Random access, everyone will write to the same disk.

You can arrange locking by creating a busy file of 0 bytes. When
present others should back off reading or writing.

This is that SQL is for. See http://mindprod.com/jgloss/sql.html
 
A

Alex

Sorry, I didn't make myself very clear.

I want to be able to write on a specific part of the HDD and then overwrite
that same physical area of the HDD with random data bits for obvious
security reasons.
 
P

pete kirkham

Alex said:
Hi , I'm developing a piece of software as part of a Univ. project
(http://www.dcs.warwick.ac.uk/~csvmh) and I have a few questions...

1) For security reasons I want to be able to store an output stream in main
memory rather than on disk (i.e. 'something else' vs FileOutputStream). Is
there something in the Java API for doing this?

No, the virtual memory system that is part of the OSes that most JVMs
run on will allow any portion of memory to get copied to the disk at any
time.
2) Is there a way of forcing FileOutputStream to write on the same physical
area on the HDD? And is there a way of controlling other applications from
accessing that part of the HDD while my application is running?

As far as I know, not within the abstractions provided by Java.
I want to be able to write on a specific part of the HDD and then overwrite
that same physical area of the HDD with random data bits for obvious
security reasons.
You need to be operating below the levele of abstraction provided by the
OS's file system. Java relies on these abstractions to provide platform
independance; this will require native code on each platform you plan to
target.


Pete
 
M

Michael Amling

Alex said:
Hi , I'm developing a piece of software as part of a Univ. project
(http://www.dcs.warwick.ac.uk/~csvmh) and I have a few questions...

1) For security reasons I want to be able to store an output stream in main
memory rather than on disk (i.e. 'something else' vs FileOutputStream). Is
there something in the Java API for doing this?
java.io.ByteArrayOutputStream


2) Is there a way of forcing FileOutputStream to write on the same physical
area on the HDD?

While it's not guaranteed, I think your best bet is
java.io.RandomAccessFile.
And is there a way of controlling other applications from
accessing that part of the HDD while my application is running?

In MVS there is. In other operating systems, AFAIK, another
application that has permission to read the file can do so regardless of
what your program does.

--Mike Amling
 
A

Alex

Thanks for your replies.

As part of the project I will also be taking a look at the main
disadvantages of Java and platform independant programming languages in
respect to security and in general.

Any useful links to websites will be greatly appreciated.
 
S

Seebs

As part of the project I will also be taking a look at the main
disadvantages of Java and platform independant programming languages in
respect to security and in general.

I recommend focusing on the huge insurgence of Java-based viruses, compared
to viruses targeting platform-specific tools such as Outlook.

-s
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top