Tabnine Logo
FileContents.getOutputStream
Code IndexAdd Tabnine to your IDE (free)

How to use
getOutputStream
method
in
javax.jnlp.FileContents

Best Java code snippets using javax.jnlp.FileContents.getOutputStream (Showing top 4 results out of 315)

origin: org.slick2d/slick2d-core

.getOutputStream(false));
origin: org.jbundle.util/org.jbundle.util.muffinmanager

OutputStream os = fc.getOutputStream(false);
byte[] buf = strValue.getBytes(ENCODING);
os.write(buf);
origin: org.jdesktop.bsaf/bsaf

@Override
public OutputStream openOutputFile(String fileName, boolean append) throws IOException {
  checkBasics("openOutputFile");
  URL fileURL = fileNameToURL(fileName);
  try {
    FileContents fc = null;
    try {
      fc = ps.get(fileURL);
    } catch (FileNotFoundException e) {
      /* Verify that the max size for new PersistenceService
       * files is >= 100K (2^17) before opening one.
       */
      long maxSizeRequest = 131072L;
      long maxSize = ps.create(fileURL, maxSizeRequest);
      if (maxSize >= maxSizeRequest) {
        fc = ps.get(fileURL);
      }
    }
    if ((fc != null) && (fc.canWrite())) {
      return new BufferedOutputStream(fc.getOutputStream(!append));
    } else {
      throw new IOException("unable to create FileContents object");
    }
  } catch (Exception e) {
    throw new IOException("openOutputFile \"" + fileName + "\" failed", e);
  }
}
origin: net.java.dev.appframework/appframework

public OutputStream openOutputFile(String fileName) throws IOException {
  checkBasics("openOutputFile");
  URL fileURL = fileNameToURL(fileName);
  try {
  FileContents fc = null;
  try {
    fc = ps.get(fileURL);  
  }
  catch (FileNotFoundException e) {
    /* Verify that the max size for new PersistenceService 
     * files is >= 100K (2^17) before opening one.
     */
    long maxSizeRequest = 131072L;
    long maxSize = ps.create(fileURL, maxSizeRequest);
    if (maxSize >= maxSizeRequest) {
    fc = ps.get(fileURL);
    }
  }
  if ((fc != null) && (fc.canWrite())) {
    return new BufferedOutputStream(fc.getOutputStream(true));
  }
  else {
    throw new IOException("unable to create FileContents object");
  }
  } 
  catch(Exception e) {
  throw new LSException("openOutputFile \"" + fileName + "\" failed", e);
  }
}
javax.jnlpFileContentsgetOutputStream

Popular methods of FileContents

  • getInputStream
  • canWrite
  • getLength
  • getMaxLength
  • getName

Popular in Java

  • Running tasks concurrently on multiple threads
  • onRequestPermissionsResult (Fragment)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • scheduleAtFixedRate (Timer)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • Runner (org.openjdk.jmh.runner)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now