org.hd.d.pg2k.clApp.uploader
Class NormalFileContent

java.lang.Object
  extended by org.hd.d.pg2k.clApp.uploader.NormalFileContent
All Implemented Interfaces:
javax.jnlp.FileContents

final class NormalFileContent
extends java.lang.Object
implements javax.jnlp.FileContents

Wrap a normal File as FileContents for non-random read-only access. Package-visible for access by GUI classes.


Field Summary
(package private)  java.io.File f
          Internal form of name; never null.
 
Constructor Summary
NormalFileContent(java.io.File f)
          Construct an instance from a (non-null) File.
 
Method Summary
 boolean canRead()
           
 boolean canWrite()
           
 java.io.InputStream getInputStream()
           
 long getLength()
           
 long getMaxLength()
           
 java.lang.String getName()
           
 java.io.OutputStream getOutputStream(boolean b)
           
 javax.jnlp.JNLPRandomAccessFile getRandomAccessFile(java.lang.String s)
           
 long setMaxLength(long l)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

f

final java.io.File f
Internal form of name; never null.

Constructor Detail

NormalFileContent

NormalFileContent(java.io.File f)
Construct an instance from a (non-null) File.

Method Detail

getName

public java.lang.String getName()
Specified by:
getName in interface javax.jnlp.FileContents

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Specified by:
getInputStream in interface javax.jnlp.FileContents
Throws:
java.io.IOException

getOutputStream

public java.io.OutputStream getOutputStream(boolean b)
Specified by:
getOutputStream in interface javax.jnlp.FileContents

getLength

public long getLength()
Specified by:
getLength in interface javax.jnlp.FileContents

canRead

public boolean canRead()
Specified by:
canRead in interface javax.jnlp.FileContents

canWrite

public boolean canWrite()
Specified by:
canWrite in interface javax.jnlp.FileContents

getRandomAccessFile

public javax.jnlp.JNLPRandomAccessFile getRandomAccessFile(java.lang.String s)
Specified by:
getRandomAccessFile in interface javax.jnlp.FileContents

getMaxLength

public long getMaxLength()
Specified by:
getMaxLength in interface javax.jnlp.FileContents

setMaxLength

public long setMaxLength(long l)
Specified by:
setMaxLength in interface javax.jnlp.FileContents

DHD Multimedia Gallery V1.60.69

Copyright (c) 1996-2012, Damon Hart-Davis. All rights reserved.