Package org.apache.sling.testing.mock.sling.services

# Class MockMimeTypeService

java.lang.Object
org.apache.sling.commons.mime.internal.MimeTypeServiceImpl
org.apache.sling.testing.mock.sling.services.MockMimeTypeService

All Implemented Interfaces:
  `EventListener`, `org.apache.sling.commons.mime.MimeTypeService`, `org.osgi.framework.BundleListener`

public final class MockMimeTypeService extends org.apache.sling.commons.mime.internal.MimeTypeServiceImpl
Mock `MimeTypeService` implementation.

## Nested Class Summary

## Nested classes/interfaces inherited from class org.apache.sling.commons.mime.internal.MimeTypeServiceImpl

`org.apache.sling.commons.mime.internal.MimeTypeServiceImpl.Config`

## Field Summary

### Fields inherited from class org.apache.sling.commons.mime.internal.MimeTypeServiceImpl

`CORE_MIME_TYPES, MIME_TYPES`

## Constructor Summary

Constructors
Constructor
Description
`MockMimeTypeService()`

## Method Summary

Modifier and Type
Method
Description
`String`
`getExtension(String mimeType)`
`String`
`getMimeType(String name)`
`void`
`registerMimeType(InputStream mimeTabStream)`
`void`
`registerMimeType(String mimeType, String... extensions)`

### Methods inherited from class org.apache.sling.commons.mime.internal.MimeTypeServiceImpl

`activate, bindMimeTypeProvider, bundleChanged, deactivate, getExtensionMap, getMimeMap, unbindMimeTypeProvider`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MockMimeTypeService

public MockMimeTypeService()

## Method Details

### getMimeType

public String getMimeType(String name)

Specified by:
  `getMimeType` in interface `org.apache.sling.commons.mime.MimeTypeService`
Overrides:
  `getMimeType` in class `org.apache.sling.commons.mime.internal.MimeTypeServiceImpl`

### getExtension

public String getExtension(String mimeType)

Specified by:
  `getExtension` in interface `org.apache.sling.commons.mime.MimeTypeService`
Overrides:
  `getExtension` in class `org.apache.sling.commons.mime.internal.MimeTypeServiceImpl`

### registerMimeType

public void registerMimeType(String mimeType, String... extensions)

Specified by:
  `registerMimeType` in interface `org.apache.sling.commons.mime.MimeTypeService`
Overrides:
  `registerMimeType` in class `org.apache.sling.commons.mime.internal.MimeTypeServiceImpl`

### registerMimeType

public void registerMimeType(InputStream mimeTabStream) throws IOException

Specified by:
  `registerMimeType` in interface `org.apache.sling.commons.mime.MimeTypeService`
Overrides:
  `registerMimeType` in class `org.apache.sling.commons.mime.internal.MimeTypeServiceImpl`
Throws:
  `IOException`