Questions on the NIO.2 API
Alan.Bateman at oracle.com
Mon Jan 31 09:55:35 PST 2011
Martijn Verburg wrote:
> I think it could be made clearer in the Javadocs at the level of the
> class description? Something like that type and store are almost free
> text field meta information? The docs on the two getters for name and
> type are pretty clear ("...implementation specific..").
> I instinctively thought about using storage type as an additional
> check. For example I may have plugged in an incorrect USB stick (with
> an incompatible file storage) or some dastardly Hollywood villain has
> inserted a storage device that's almost identical to the one that our
> system is used to seeing. Pity s/he didn't know about different
> storage types - sound the alarm!
I suspect you might be thinking about the volume name/label or volume
serial number. In our Windows provider then the name method returns the
volume name. The volume serial number (that get sets when the volume is
formatted) isn't known to the API but can be retrieved via the
getAttribute method if really needed.
More information about the nio-dev