Tabnine Logo
Properties.load
Code IndexAdd Tabnine to your IDE (free)

How to use
load
method
in
org.kie.commons.java.nio.base.Properties

Best Java code snippets using org.kie.commons.java.nio.base.Properties.load (Showing top 5 results out of 315)

origin: org.kie.commons/kie-nio2-model

public void load( final InputStream in ) {
  load( in, true );
}
origin: org.kie.commons/kie-commons-io

protected void loadDotFile( final Path path ) {
  final Properties content = new Properties();
  content.load( newInputStream( dot( path ) ) );
  if ( path instanceof AttrHolder ) {
    ( (AttrHolder) path ).getAttrStorage().loadContent( content );
  }
}
origin: org.kie.commons/kie-commons-io

@Override
public Map<String, Object> readAttributes( final Path path,
                      final String attributes )
    throws UnsupportedOperationException, NoSuchFileException, IllegalArgumentException,
    IOException, SecurityException {
  checkNotNull( "path", path );
  checkNotEmpty( "attributes", attributes );
  final Properties original = new Properties( Files.readAttributes( path, attributes ) );
  if ( attributes.equals( "*" ) && exists( dot( path ) ) ) {
    boolean isAttrHolder = path instanceof AttrHolder;
    if ( isAttrHolder && ( (AttrHolder) path ).getAttrStorage().getContent().size() > 0 ) {
      return ( (AttrHolder) path ).getAttrStorage().getAllContent();
    }
    final Properties content = new Properties();
    content.load( newInputStream( dot( path ) ) );
    content.putAll( original );
    if ( isAttrHolder ) {
      ( (AttrHolder) path ).getAttrStorage().loadContent( content );
    }
    return content;
  }
  return original;
}
origin: org.kie.commons/kie-commons-io

protected synchronized Path internalCreateDirectory( final Path dir,
                           final boolean skipAlreadyExistsException,
                           final FileAttribute<?>... attrs )
    throws IllegalArgumentException, UnsupportedOperationException, FileAlreadyExistsException,
    IOException, SecurityException {
  checkNotNull( "dir", dir );
  FileAttribute<?>[] allAttrs = attrs;
  try {
    Files.createDirectory( dir, attrs );
  } catch ( final FileAlreadyExistsException ex ) {
    final Properties properties = new Properties();
    if ( exists( dot( dir ) ) ) {
      properties.load( newInputStream( dot( dir ) ) );
    }
    allAttrs = consolidate( properties, attrs );
    if ( !skipAlreadyExistsException ) {
      throw ex;
    }
  }
  buildDotFile( dir, newOutputStream( dot( dir ) ), allAttrs );
  return dir;
}
origin: org.kie.commons/kie-commons-io

@Override
public synchronized SeekableByteChannel newByteChannel( final Path path,
                            final Set<? extends OpenOption> options,
                            final FileAttribute<?>... attrs )
    throws IllegalArgumentException, UnsupportedOperationException,
    FileAlreadyExistsException, IOException, SecurityException {
  checkNotNull( "path", path );
  final Properties properties = new Properties();
  if ( exists( dot( path ) ) ) {
    properties.load( newInputStream( dot( path ) ) );
  }
  final FileAttribute<?>[] allAttrs = consolidate( properties, attrs );
  final SeekableByteChannel result = Files.newByteChannel( path, buildOptions( options ), allAttrs );
  if ( isFileScheme( path ) ) {
    buildDotFile( path, newOutputStream( dot( path ) ), allAttrs );
  }
  return result;
}
org.kie.commons.java.nio.basePropertiesload

Popular methods of Properties

  • <init>
  • putAll
  • clear
  • entrySet
  • put
  • remove
  • store

Popular in Java

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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