Class StaticFilesHandler (2.55.0)

public final class StaticFilesHandler extends GeneratedMessageV3 implements StaticFilesHandlerOrBuilder

Files served directly to the user for a given URL, such as images, CSS stylesheets, or JavaScript source files. Static file handlers describe which files in the application directory are static files, and which URLs serve them.

Protobuf type google.appengine.v1.StaticFilesHandler

Static Fields

APPLICATION_READABLE_FIELD_NUMBER

public static final int APPLICATION_READABLE_FIELD_NUMBER
Field Value
Type Description
int

EXPIRATION_FIELD_NUMBER

public static final int EXPIRATION_FIELD_NUMBER
Field Value
Type Description
int

HTTP_HEADERS_FIELD_NUMBER

public static final int HTTP_HEADERS_FIELD_NUMBER
Field Value
Type Description
int

MIME_TYPE_FIELD_NUMBER

public static final int MIME_TYPE_FIELD_NUMBER
Field Value
Type Description
int

PATH_FIELD_NUMBER

public static final int PATH_FIELD_NUMBER
Field Value
Type Description
int

REQUIRE_MATCHING_FILE_FIELD_NUMBER

public static final int REQUIRE_MATCHING_FILE_FIELD_NUMBER
Field Value
Type Description
int

UPLOAD_PATH_REGEX_FIELD_NUMBER

public static final int UPLOAD_PATH_REGEX_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static StaticFilesHandler getDefaultInstance()
Returns
Type Description
StaticFilesHandler

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static StaticFilesHandler.Builder newBuilder()
Returns
Type Description
StaticFilesHandler.Builder

newBuilder(StaticFilesHandler prototype)

public static StaticFilesHandler.Builder newBuilder(StaticFilesHandler prototype)
Parameter
Name Description
prototype StaticFilesHandler
Returns
Type Description
StaticFilesHandler.Builder

parseDelimitedFrom(InputStream input)

public static StaticFilesHandler parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
StaticFilesHandler
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StaticFilesHandler parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StaticFilesHandler
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static StaticFilesHandler parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
StaticFilesHandler
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static StaticFilesHandler parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StaticFilesHandler
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static StaticFilesHandler parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
StaticFilesHandler
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static StaticFilesHandler parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StaticFilesHandler
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static StaticFilesHandler parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
StaticFilesHandler
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static StaticFilesHandler parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StaticFilesHandler
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static StaticFilesHandler parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
StaticFilesHandler
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static StaticFilesHandler parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StaticFilesHandler
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static StaticFilesHandler parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
StaticFilesHandler
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static StaticFilesHandler parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StaticFilesHandler
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<StaticFilesHandler> parser()
Returns
Type Description
Parser<StaticFilesHandler>

Methods

containsHttpHeaders(String key)

public boolean containsHttpHeaders(String key)

HTTP headers to use for all responses from these URLs.

map<string, string> http_headers = 3;

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getApplicationReadable()

public boolean getApplicationReadable()

Whether files should also be uploaded as code data. By default, files declared in static file handlers are uploaded as static data and are only served to end users; they cannot be read by the application. If enabled, uploads are charged against both your code and static data storage resource quotas.

bool application_readable = 7;

Returns
Type Description
boolean

The applicationReadable.

getDefaultInstanceForType()

public StaticFilesHandler getDefaultInstanceForType()
Returns
Type Description
StaticFilesHandler

getExpiration()

public Duration getExpiration()

Time a static file served by this handler should be cached by web proxies and browsers.

.google.protobuf.Duration expiration = 5;

Returns
Type Description
Duration

The expiration.

getExpirationOrBuilder()

public DurationOrBuilder getExpirationOrBuilder()

Time a static file served by this handler should be cached by web proxies and browsers.

.google.protobuf.Duration expiration = 5;

Returns
Type Description
DurationOrBuilder

getHttpHeaders() (deprecated)

public Map<String,String> getHttpHeaders()

Use #getHttpHeadersMap() instead.

Returns
Type Description
Map<String,String>

getHttpHeadersCount()

public int getHttpHeadersCount()

HTTP headers to use for all responses from these URLs.

map<string, string> http_headers = 3;

Returns
Type Description
int

getHttpHeadersMap()

public Map<String,String> getHttpHeadersMap()

HTTP headers to use for all responses from these URLs.

map<string, string> http_headers = 3;

Returns
Type Description
Map<String,String>

getHttpHeadersOrDefault(String key, String defaultValue)

public String getHttpHeadersOrDefault(String key, String defaultValue)

HTTP headers to use for all responses from these URLs.

map<string, string> http_headers = 3;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getHttpHeadersOrThrow(String key)

public String getHttpHeadersOrThrow(String key)

HTTP headers to use for all responses from these URLs.

map<string, string> http_headers = 3;

Parameter
Name Description
key String
Returns
Type Description
String

getMimeType()

public String getMimeType()

MIME type used to serve all files served by this handler.

Defaults to file-specific MIME types, which are derived from each file's filename extension.

string mime_type = 4;

Returns
Type Description
String

The mimeType.

getMimeTypeBytes()

public ByteString getMimeTypeBytes()

MIME type used to serve all files served by this handler.

Defaults to file-specific MIME types, which are derived from each file's filename extension.

string mime_type = 4;

Returns
Type Description
ByteString

The bytes for mimeType.

getParserForType()

public Parser<StaticFilesHandler> getParserForType()
Returns
Type Description
Parser<StaticFilesHandler>
Overrides

getPath()

public String getPath()

Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern.

string path = 1;

Returns
Type Description
String

The path.

getPathBytes()

public ByteString getPathBytes()

Path to the static files matched by the URL pattern, from the application root directory. The path can refer to text matched in groupings in the URL pattern.

string path = 1;

Returns
Type Description
ByteString

The bytes for path.

getRequireMatchingFile()

public boolean getRequireMatchingFile()

Whether this handler should match the request if the file referenced by the handler does not exist.

bool require_matching_file = 6;

Returns
Type Description
boolean

The requireMatchingFile.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getUploadPathRegex()

public String getUploadPathRegex()

Regular expression that matches the file paths for all files that should be referenced by this handler.

string upload_path_regex = 2;

Returns
Type Description
String

The uploadPathRegex.

getUploadPathRegexBytes()

public ByteString getUploadPathRegexBytes()

Regular expression that matches the file paths for all files that should be referenced by this handler.

string upload_path_regex = 2;

Returns
Type Description
ByteString

The bytes for uploadPathRegex.

hasExpiration()

public boolean hasExpiration()

Time a static file served by this handler should be cached by web proxies and browsers.

.google.protobuf.Duration expiration = 5;

Returns
Type Description
boolean

Whether the expiration field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public StaticFilesHandler.Builder newBuilderForType()
Returns
Type Description
StaticFilesHandler.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected StaticFilesHandler.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
StaticFilesHandler.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public StaticFilesHandler.Builder toBuilder()
Returns
Type Description
StaticFilesHandler.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException