# Class CloudStorageConfiguration (0.133.0)

0.133.0 (latest) 0.131.0 0.128.13 0.127.38 0.126.19 0.125.0 0.124.21 0.123.28

    public abstract class CloudStorageConfiguration

Configuration for [CloudStorageFileSystem](https://docs.cloud.google.com/java/docs/reference/google-cloud-nio/latest/com.google.cloud.storage.contrib.nio.CloudStorageFileSystem) instances.

## Inheritance

[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \> CloudStorageConfiguration

## Inherited Members

[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) [Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) [Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) [Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) [Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) [Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) [Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) [Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) [Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) [Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) [Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)

## Static Fields

### DEFAULT

    public static final CloudStorageConfiguration DEFAULT

| **Field Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-nio/latest/com.google.cloud.storage.contrib.nio.CloudStorageConfiguration` |   |

## Static Methods

### builder()

    public static CloudStorageConfiguration.Builder builder()

Creates a new builder, initialized with the following settings:

- Performing I/O on paths with extra slashes, e.g. `a//b` will throw an error.
- The prefix slash on absolute paths will be removed when converting to an object name.
- Pseudo-directories are enabled, so any path with a trailing slash is a fake directory.
- Channel re-opens are disabled.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-nio/latest/com.google.cloud.storage.contrib.nio.CloudStorageConfiguration.Builder` |   |

## Methods

### blockSize()

    public abstract int blockSize()

Returns block size (in bytes) used when talking to the Google Cloud Storage HTTP server.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### maxChannelReopens()

    public abstract int maxChannelReopens()

Returns the number of times we try re-opening a channel if it's closed unexpectedly while
reading.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### permitEmptyPathComponents()

    public abstract boolean permitEmptyPathComponents()

Returns `true` if we *shouldn't* throw an exception when encountering object names
containing superfluous slashes, e.g. `a//b`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### reopenableExceptions()

    public abstract ImmutableList<Class<? extends Exception>> reopenableExceptions()

Returns the set of exceptions for which we'll try a channel reopen if maxChannelReopens is
positive.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.common.collect.ImmutableList<https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html<? extends java.lang.Exception>>` |   |

### retryableHttpCodes()

    public abstract ImmutableList<Integer> retryableHttpCodes()

Returns the set of HTTP error codes that will be retried, in addition to the normally retryable
ones.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `com.google.common.collect.ImmutableList<https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html>` |   |

### stripPrefixSlash()

    public abstract boolean stripPrefixSlash()

Returns `true` if '/' prefix on absolute object names should be removed before I/O.

If you disable this feature, please take into consideration that all paths created from a
URI will have the leading slash.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### usePseudoDirectories()

    public abstract boolean usePseudoDirectories()

Returns `true` if directories and paths with a trailing slash should be treated as fake
directories.

With this feature, if file "foo/bar.txt" exists then both "foo" and "foo/" will be treated
as if they were existing directories. On path construction no I/O will be performed, bucket and
"directory" will treated as if they exist.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### useUserProjectOnlyForRequesterPaysBuckets()

    public abstract boolean useUserProjectOnlyForRequesterPaysBuckets()

Returns whether userProject will be cleared for non-requester-pays buckets. That is, if false
(the default value), setting userProject causes that project to be billed regardless of whether
the bucket is requester-pays or not. If true, setting userProject will only cause that project
to be billed when the project is requester-pays.

Setting this will cause the bucket to be accessed when the CloudStorageFileSystem object is
created.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` |   |

### userProject()

    public abstract String userProject()

Returns the project to be billed when accessing buckets. Leave empty for normal semantics, set
to bill that project (project you own) for all accesses. This is required for accessing
requester-pays buckets. This value cannot be null.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |

### workingDirectory()

    public abstract String workingDirectory()

Returns path of current working directory. This defaults to the root directory.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |   |