org.eclipse.actf.util

## Class JapaneseEncodingDetector

- java.lang.Object
- - org.eclipse.actf.util.JapaneseEncodingDetector

    public class JapaneseEncodingDetector
    extends Object

Utility class for detecting Japanese encoding.

### Constructor Summary

Constructors
Constructor and Description
`JapaneseEncodingDetector(InputStream is)` Constructor for Japanese encoding detector.

### Method Summary

Methods
`String` `detect()` Return detected Japanese encoding of the target input stream.
`byte[]` `getByteArray()` Return byte array that includes content of the target input stream.
`InputStream` `getInputStream()` Return input stream that includes content of the target input stream.
`int` `getLength()` Return length of the target input stream.

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

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

### Constructor Detail

#### JapaneseEncodingDetector

    public JapaneseEncodingDetector(InputStream is)

Constructor for Japanese encoding detector.

Parameters:
  `is` - the target input stream

### Method Detail

#### getInputStream

    public InputStream getInputStream()

Return input stream that includes content of the target input stream. Need to call detect method before calling this method.

Returns:
  input stream that includes content of the target input stream

#### getLength

    public int getLength()

Return length of the target input stream.

Returns:
  length of the target input stream

#### getByteArray

    public byte[] getByteArray()

Return byte array that includes content of the target input stream. Need to call detect method before calling this method.

Returns:
  byte array that includes content of the target input stream

#### detect

    public String detect()
                  throws IOException

Return detected Japanese encoding of the target input stream.

Returns:
  detected encoding
Throws:
  `IOException`